aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-03 21:34:17 -0700
committerAllan Wang <me@allanwang.ca>2017-06-03 21:34:17 -0700
commit610df8c6d772324095b1c3d2cc17f9c243be6c06 (patch)
tree3d669f6bdd343ab9db8cbc9910e933e23b381fd2
parent8ec65f55f85c730e97d5521c1443819435b98208 (diff)
downloadfrost-610df8c6d772324095b1c3d2cc17f9c243be6c06.tar.gz
frost-610df8c6d772324095b1c3d2cc17f9c243be6c06.tar.bz2
frost-610df8c6d772324095b1c3d2cc17f9c243be6c06.zip
test crashlytics
-rw-r--r--.gitignore4
-rw-r--r--.idea/modules.xml1
-rw-r--r--.travis.yml3
-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
-rw-r--r--build.gradle5
-rw-r--r--gradle.properties3
9 files changed, 36 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index ff954def..a62725a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,6 @@
.externalNativeBuild
/app/src/main/res/values/strings_facebook.xml
/app/src/main/kotlin/com/pitchedapps/frost/facebook/Private.kt
-*.min.css \ No newline at end of file
+*.min.css
+/app/src/main/res/values/fabric.xml
+fabric.properties
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 3c64fcbf..7451d719 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,7 +3,6 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Frost-for-Facebook.iml" filepath="$PROJECT_DIR$/Frost-for-Facebook.iml" />
- <module fileurl="file://$PROJECT_DIR$/Frost-for-Facebook.iml" filepath="$PROJECT_DIR$/Frost-for-Facebook.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
diff --git a/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8TkrQ/8ISCdlSeDhDyplLJISdonIWQJA=
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 ->
diff --git a/build.gradle b/build.gradle
index 6fafc759..1ee01293 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,12 +4,12 @@ buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
jcenter()
+ maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
+ classpath 'io.fabric.tools:gradle:1.+'
}
}
@@ -18,6 +18,7 @@ allprojects {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
+ maven { url 'https://maven.fabric.io/public' }
}
}
diff --git a/gradle.properties b/gradle.properties
index 726ebeea..e7b02084 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -47,4 +47,5 @@ AUTO_VALUE_PARCEL=0.2.5
RX_PREFS=2.0.0-RC2
EVENT_BUS=3.0.0
PAPER_PARCEL=2.0.1
-SWIPE_BACK=3.1.2 \ No newline at end of file
+SWIPE_BACK=3.1.2
+CRASHLYTICS=2.6.8 \ No newline at end of file