Enable Crashlytics for release builds only.

This commit is contained in:
Sylwester Zieliński
2022-04-12 11:16:14 +02:00
parent 5dfa67b587
commit cd61aa1a2d
2 changed files with 9 additions and 1 deletions

View File

@@ -4,10 +4,14 @@ plugins {
id 'kotlin-parcelize'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'com.google.firebase.crashlytics'
}
apply from: rootProject.file("gradle/git-tag-version.gradle")
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")){
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
}
android {
namespace 'no.nordicsemi.android.nrftoolbox'

View File

@@ -12,3 +12,7 @@
-keepclasseswithmembers class * {
@org.simpleframework.xml.* <fields>;
}
# Crashlytics
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.