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