aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle12
-rw-r--r--app/proguard-rules.pro8
-rw-r--r--app/src/main/AndroidManifest.xml4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt4
4 files changed, 26 insertions, 2 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 9c76f38c..281799ef 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,6 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
+apply plugin: 'io.fabric'
+def fabricProps = new Properties()
+file("../fabric.properties").withInputStream {
+ stream -> fabricProps.load(stream)
+}
+def FABRIC_API_KEY = System.env.FABRIC_API_KEY ?: fabricProps.getProperty('FABRIC_API_KEY', 'empty')
+println 'Fabric ' + FABRIC_API_KEY
android {
compileSdkVersion Integer.parseInt(project.TARGET_SDK)
buildToolsVersion project.BUILD_TOOLS
@@ -13,6 +20,7 @@ android {
versionName project.VERSION_NAME
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ manifestPlaceholders = [fabricApiKey: FABRIC_API_KEY]
}
applicationVariants.all { variant ->
@@ -142,6 +150,10 @@ dependencies {
kapt "nz.bradcampbell:paperparcel-compiler:${PAPER_PARCEL}"
compile "com.jude:swipebackhelper:${SWIPE_BACK}"
+
+ compile("com.crashlytics.sdk.android:crashlytics:${CRASHLYTICS}@aar") {
+ transitive = true;
+ }
}
kapt {
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 550646f0..931de8da 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -5,4 +5,10 @@
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
}
--keep enum org.greenrobot.eventbus.ThreadMode { *; } \ No newline at end of file
+-keep enum org.greenrobot.eventbus.ThreadMode { *; }
+
+-keepclassmembers class * extends java.lang.Enum {
+ public *;
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+} \ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c09c1209..ae058ff2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -93,6 +93,7 @@
<activity
android:name=".LoginActivity"
android:theme="@style/AppTheme.NoActionBar" />
+
<receiver
android:name=".services.NotificationReceiver"
android:enabled="true"
@@ -103,6 +104,9 @@
<action android:name="com.pitchedapps.frost.NOTIFICATIONS" />
</intent-filter>
</receiver>
+ <meta-data
+ android:name="io.fabric.ApiKey"
+ android:value="${fabricApiKey}" />
</application>
</manifest> \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
index 936c237a..2f81d387 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
@@ -2,9 +2,11 @@ package com.pitchedapps.frost
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
+import com.crashlytics.android.Crashlytics
import com.pitchedapps.frost.dbflow.loadFbCookiesAsync
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.launchNewTask
+import io.fabric.sdk.android.Fabric
/**
* Created by Allan Wang on 2017-05-28.
@@ -13,7 +15,7 @@ class StartActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
-
+ Fabric.with(this, Crashlytics())
L.d("Load cookies ${System.currentTimeMillis()}")
loadFbCookiesAsync {
cookies ->