feat: add sentry
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2025. All rights reserved.
|
||||
*/
|
||||
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
@@ -22,6 +24,15 @@ android {
|
||||
setProperty("archivesBaseName", "$applicationId-v$versionCode($versionName)")
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
val secretProperties = Properties().apply {
|
||||
val secretFile = rootProject.file("secrets.properties")
|
||||
if (secretFile.exists())
|
||||
secretFile.inputStream().use { load(it) }
|
||||
else
|
||||
println("Warning: secrets.properties not found!")
|
||||
}
|
||||
manifestPlaceholders["sentry_url"] = secretProperties.getProperty("SENTRY_URL")!!
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -31,6 +42,10 @@ android {
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
manifestPlaceholders["sentry_env"] = "production"
|
||||
}
|
||||
debug {
|
||||
manifestPlaceholders["sentry_env"] = "develop"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
@@ -72,4 +87,5 @@ dependencies {
|
||||
implementation(libs.logback.classic)
|
||||
|
||||
implementation(libs.splitties.base)
|
||||
implementation(libs.sentry)
|
||||
}
|
||||
Reference in New Issue
Block a user