Skip to content

Commit

Permalink
[Teacher][RC-1.9.1] Fix crashlytics | version bump (#448)
Browse files Browse the repository at this point in the history
* [Teacher][RC-1.9.1] Fix crashlytics

Essentially a revert of f44b66d

In an attempt to fix the ‘crash statistics’ in firebase that reports crash free users, I removed the old fabric API key as the new setup docs didn’t state anything about it. Turns out, that just broke crashlytics entirely for us. Since we are an old firebase project, we still need to provide the api key.
  • Loading branch information
CalvinKern authored Dec 16, 2019
1 parent 4fcc40e commit 9071247
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/parent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ android {
PrivateData.merge(project, "parent")
buildConfigField "String", "LOGIN_CLIENT_ID", "\"$loginClientId\""
buildConfigField "String", "LOGIN_CLIENT_SECRET", "\"$loginClientSecret\""
addManifestPlaceholders([
fabricApiKey:"$fabricApiKey"
])
}

bundle {
Expand Down
4 changes: 4 additions & 0 deletions apps/parent/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>

<meta-data
android:name="io.fabric.ApiKey"
android:value="${fabricApiKey}" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import android.content.Context
import android.util.Log
import android.webkit.WebView
import com.crashlytics.android.Crashlytics
import com.crashlytics.android.core.CrashlyticsCore
import com.google.android.play.core.missingsplits.MissingSplitsManagerFactory
import com.instructure.canvasapi2.AppManager
import com.instructure.loginapi.login.tasks.LogoutTask
Expand All @@ -42,7 +43,10 @@ class ApplicationManager : AppManager() {

super.onCreate()

Fabric.with(this, Crashlytics())
val crashlytics = Crashlytics.Builder()
.core(CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
.build()
Fabric.with(this, crashlytics)

// there appears to be a bug when the user is installing/updating the android webview stuff.
// http://code.google.com/p/android/issues/detail?id=175124
Expand Down
6 changes: 4 additions & 2 deletions apps/teacher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ android {
defaultConfig {
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 25
versionCode = 26
versionName = '1.9.1'
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
Expand All @@ -70,7 +70,9 @@ android {

/* Add private data */
PrivateData.merge(project, "teacher")

addManifestPlaceholders([
fabricApiKey:"$fabricApiKey"
])
buildConfigField "String", "PSPDFKIT_LICENSE_KEY", "\"$pspdfkitLicenseKey\""
}

Expand Down
4 changes: 4 additions & 0 deletions apps/teacher/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@
android:configChanges="orientation|screenSize"
android:theme="@style/Theme.AppCompat.NoActionBar"/>

<meta-data
android:name="io.fabric.ApiKey"
android:value="${fabricApiKey}" />

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
Expand Down

0 comments on commit 9071247

Please sign in to comment.