diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fc425f5c2d..eb3550d48c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -99,11 +99,16 @@ android:largeHeap="true"> + android:name="io.fabric.ApiKey" + android:value="d0c4d13f424a96b9064aa0a9ecafabdb0db4287f" /> - + + + diff --git a/build.gradle b/build.gradle index afbda2cc08..cf83bfe13c 100644 --- a/build.gradle +++ b/build.gradle @@ -7,15 +7,18 @@ buildscript { ext.identicon_version = "v11" ext.rss_parser_version = "2.0.4" ext.mixpanel_version = "5.+" + ext.crashlytics_version = "2.10.1" repositories { google() mavenCentral() + maven { url 'https://maven.fabric.io/public' } } dependencies { classpath "com.android.tools.build:gradle:$gradle_version" classpath files('libs/gradle-witness.jar') classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "io.fabric.tools:gradle:1.+" } } @@ -23,6 +26,7 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply plugin: 'witness' +apply plugin: 'io.fabric' repositories { mavenLocal() @@ -58,9 +62,8 @@ repositories { } google() jcenter() - maven { - url "https://jitpack.io" - } + maven { url 'https://maven.fabric.io/public' } + maven { url "https://jitpack.io" } } configurations.all { @@ -186,6 +189,9 @@ dependencies { implementation "com.github.lelloman:android-identicons:$identicon_version" implementation "com.prof.rssparser:rssparser:$rss_parser_version" implementation "com.mixpanel.android:mixpanel-android:$mixpanel_version" + implementation("com.crashlytics.sdk.android:crashlytics:$crashlytics_version@aar") { + transitive = true + } } def canonicalVersionCode = 13 diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 0baa851b1b..c469f4f27b 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -26,6 +26,7 @@ import android.os.Build; import android.support.annotation.NonNull; import android.support.multidex.MultiDexApplication; +import com.crashlytics.android.Crashlytics; import com.google.android.gms.security.ProviderInstaller; import com.mixpanel.android.mpmetrics.MixpanelAPI; @@ -96,6 +97,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import dagger.ObjectGraph; +import io.fabric.sdk.android.Fabric; import kotlin.Unit; import kotlin.jvm.functions.Function1; import network.loki.messenger.BuildConfig; @@ -160,6 +162,7 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc // Loki - Set up P2P API if needed setUpP2PAPI(); // Loki - Set up beta analytics + Fabric.with(this, new Crashlytics()); mixpanel = MixpanelAPI.getInstance(this, "59040b6707e5a1725f3fb6730fefca92"); Analytics.Companion.getShared().trackImplementation = (Function1) event -> { HashMap properties = new HashMap();