Enabling crashlytics reports on release builds only
This commit is contained in:
parent
9594726052
commit
d0218727e9
3 changed files with 14 additions and 0 deletions
|
@ -29,12 +29,16 @@ android {
|
|||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
// enable crashlytics
|
||||
buildConfigField "boolean", "USE_CRASHLYTICS", "true"
|
||||
}
|
||||
debug {
|
||||
// TODO enabling minify breaks the debugger breakpoints, find a way to fix it and enable minify again
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
resValue("string", "PORT_NUMBER", "8082")
|
||||
// disable crashlytics
|
||||
buildConfigField "boolean", "USE_CRASHLYTICS", "false"
|
||||
}
|
||||
}
|
||||
android.packagingOptions {
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
<meta-data
|
||||
android:name="com.google.android.geo.API_KEY"
|
||||
android:value="@string/google_maps_key"/>
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="false" />
|
||||
<!-- Avoid crashes with Google maps in SDK 28 (Android 9 [Pie]) -->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
<activity
|
||||
|
|
|
@ -14,6 +14,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.lifecycle.Observer
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import cy.agorise.bitsybitshareswallet.BuildConfig
|
||||
import cy.agorise.bitsybitshareswallet.database.entities.Balance
|
||||
import cy.agorise.bitsybitshareswallet.processors.TransfersLoader
|
||||
import cy.agorise.bitsybitshareswallet.repositories.AssetRepository
|
||||
|
@ -32,6 +33,7 @@ import cy.agorise.graphenej.models.AccountProperties
|
|||
import cy.agorise.graphenej.models.BlockHeader
|
||||
import cy.agorise.graphenej.models.FullAccountDetails
|
||||
import cy.agorise.graphenej.models.JsonRpcResponse
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.text.ParseException
|
||||
|
@ -95,6 +97,11 @@ abstract class ConnectedActivity : AppCompatActivity(), ServiceConnection {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
if (BuildConfig.USE_CRASHLYTICS) {
|
||||
// Enabling crashlytics reports on release builds only
|
||||
Fabric.with(this, Crashlytics())
|
||||
}
|
||||
|
||||
getUserAccount()
|
||||
|
||||
mAssetRepository = AssetRepository(this)
|
||||
|
|
Loading…
Reference in a new issue