Skip to content
Snippets Groups Projects
Commit 4fd144bb authored by Jonas Broeckmann's avatar Jonas Broeckmann
Browse files

Ignore crash handling for debug builds

parent 2a258f73
Branches
Tags
1 merge request!2Official API
......@@ -58,17 +58,7 @@ android {
debugCredentials(null, null, null, null)
}
release {
releaseConfig()
}
create("releasePreview") {
releaseConfig()
applicationIdSuffix = ".debug"
signingConfig = signingConfigs.getByName("debug")
}
debug {
applicationIdSuffix = ".debug"
signingConfig = signingConfigs.getByName("debug")
fun ApplicationBuildType.debugConfig() {
proguardFiles(
"proguard-rules.pro"
)
......@@ -81,6 +71,20 @@ android {
)
}
}
release {
releaseConfig()
}
create("releasePreview") {
releaseConfig()
applicationIdSuffix = ".debug"
signingConfig = signingConfigs.getByName("debug")
}
debug {
debugConfig()
applicationIdSuffix = ".debug"
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_19
......
......@@ -23,24 +23,27 @@ object CrashHandling {
private const val ReportEmail = "broeckmann@embedded.rwth-aachen.de"
context (Application)
fun init() = initAcra {
buildConfigClass = BuildConfig::class.java
reportFormat = StringFormat.JSON
mailSender {
val appName = getString(R.string.app_name)
mailTo = ReportEmail
fun init() {
if (BuildConfig.DEBUG) return
initAcra {
buildConfigClass = BuildConfig::class.java
reportFormat = StringFormat.JSON
mailSender {
val appName = getString(R.string.app_name)
mailTo = ReportEmail
reportAsFile = true
reportFileName = "${appName.uppercase()}-CRASH-REPORT.json"
reportAsFile = true
reportFileName = "${appName.uppercase()}-CRASH-REPORT.json"
subject = "$appName Crash Report"
body = """
Whoops! It seems like $appName crashed.
Please help us to improve the app by sending this crash report.
""".trimIndent()
}
limiter {
enabled = true
subject = "$appName Crash Report"
body = """
Whoops! It seems like $appName crashed.
Please help us to improve the app by sending this crash report.
""".trimIndent()
}
limiter {
enabled = true
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment