I just recently integrated Crashlytics into my App. But I am having a "problem": It's always enabled.
On their page (and in various stackoverflow threads) it's said to turn it off I have to include ext.enableCrashlytics = false
into my build.gradle.
So my buildTypes look like the following:
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-DEV"
ext.enableCrashlytics = false
}
release {
minifyEnabled false //TODO:Switch to true and add Proguard config to release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = true
}
}
But every time I run the debug buildType the application works without any crashes, i.e. Crashlytics.start(this)
works without a crash even though I thought that it wouldn't even be compiled into the app with enableCrashlytics = false
(strange "problem" to report, I know).
I want to understand why the app doesn't crash (to further improve my understanding of using the build.gradle file).
And I want to understand why I can't disable Crashlytics with the gradle directive proposed by Crashlytics themselves. I know I can get rid of Crashlytics by simply not starting it (no call to Crashlytics.start(this)
) but then the directive enableCrashlytics
would be useless, right?
Am I missing something?