fix: change ACRA to Sentry
This commit is contained in:
+16
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
@@ -9,6 +10,7 @@ plugins {
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
|
||||
id("com.google.devtools.ksp")
|
||||
id("io.sentry.android.gradle") version "5.5.0"
|
||||
}
|
||||
|
||||
secrets {
|
||||
@@ -32,6 +34,15 @@ android {
|
||||
useSupportLibrary = true
|
||||
}
|
||||
|
||||
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")!!
|
||||
|
||||
// javaCompileOptions {
|
||||
// annotationProcessorOptions {
|
||||
// arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||||
@@ -44,18 +55,21 @@ android {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
resValue("string", "app_name", "@string/app_name_reg")
|
||||
manifestPlaceholders["sentry_env"] = "production"
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix =
|
||||
"-debug+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
||||
resValue("string", "app_name", "@string/app_name_dev")
|
||||
manifestPlaceholders["sentry_env"] = "debug"
|
||||
}
|
||||
create("beta") {
|
||||
versionNameSuffix =
|
||||
"-beta+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
||||
resValue("string", "app_name", "@string/app_name_beta")
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
manifestPlaceholders["sentry_env"] = "beta"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
@@ -120,9 +134,9 @@ dependencies {
|
||||
|
||||
implementation(libs.compose)
|
||||
|
||||
implementation(libs.acra.http)
|
||||
implementation(libs.sentry)
|
||||
|
||||
implementation(libs.androidx.room.runtime)
|
||||
implementation(libs.androidx.room.ktx)
|
||||
ksp(libs.androidx.room.compiler)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user