Skip to content

Commit f0965a9

Browse files
committed
Fix crashlytics bug reporting by adding API Key
1 parent d77982f commit f0965a9

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ android {
102102
buildConfigField "Boolean", "IS_CI", "${isCi}"
103103
buildConfigField "Boolean", "EXTENDED_VALIDATION", "false"
104104

105-
manifestPlaceholders = [admobAppId: props.getProperty("admobAppId")]
105+
manifestPlaceholders = [admobAppId: props.getProperty("admobAppId"), crashlyticsApiKey: props.getProperty("crashlyticsApiKey")]
106106
}
107107

108108
compileOptions {
@@ -178,7 +178,7 @@ dependencies {
178178
// Firebase-related dependencies
179179
implementation "com.google.firebase:firebase-core:16.0.6"
180180
implementation "com.google.firebase:firebase-ads:17.1.2"
181-
implementation "com.crashlytics.sdk.android:crashlytics:2.9.7"
181+
implementation "com.crashlytics.sdk.android:crashlytics:2.9.8"
182182

183183
// AndroidX support libraries
184184
implementation "androidx.appcompat:appcompat:$androidxVersion"

app/keys.properties.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ backendUrl=https://postb.in/iiolsQAd
88
purchaseVerifierPath=check/buy
99
privacyPolicyUrl=https://example.com/privacy-policy/
1010
minifyEnabled=true
11-
shrinkResources=true
11+
shrinkResources=true
12+
crashlyticsApiKey=xyz

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
tools:ignore="GoogleAppIndexingWarning"
4646
tools:replace="android:label,android:supportsRtl">
4747

48+
<meta-data
49+
android:name="com.crashlytics.ApiKey"
50+
android:value="${crashlyticsApiKey}" />
51+
4852
<meta-data
4953
android:name="com.google.android.gms.ads.APPLICATION_ID"
5054
android:value="${admobAppId}" />

app/src/main/kotlin/com/njlabs/showjava/MainApplication.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ import io.reactivex.Observable
3636
import io.reactivex.disposables.CompositeDisposable
3737
import io.reactivex.schedulers.Schedulers
3838
import timber.log.Timber
39+
import com.crashlytics.android.Crashlytics
40+
import io.fabric.sdk.android.Fabric
41+
42+
3943

4044

4145
class MainApplication : MultiDexApplication() {
@@ -69,6 +73,7 @@ class MainApplication : MultiDexApplication() {
6973
)
7074

7175
Ads(this).init()
76+
Fabric.with(this, Crashlytics())
7277

7378
ViewPump.init(
7479
ViewPump.builder()

0 commit comments

Comments
 (0)