aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-12-17 21:46:33 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-12-17 21:46:33 +0900
commit5a69c851c3b536420642df710bc09db7d9488cfd (patch)
tree2c4cb312e2b4dea3e1bb443dfb125bf084e60884
parenta00d7d855fd09fbb8050f42a349348871d60f454 (diff)
downloadSmileEssence-5a69c851c3b536420642df710bc09db7d9488cfd.tar.gz
fabric の Crashlytics つかってみるよ
-rw-r--r--app/.gitignore1
-rw-r--r--app/app.iml14
-rw-r--r--app/build.gradle11
-rw-r--r--app/fabric.properties.example2
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/Application.java4
-rw-r--r--build.gradle3
6 files changed, 32 insertions, 3 deletions
diff --git a/app/.gitignore b/app/.gitignore
index 960c4f9e..c52e7fa5 100644
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -2,3 +2,4 @@
/src/main/resources/twitter4j.properties
/src/debug/resources/twitter4j.properties
/src/androidTest/assets/tokens.properties
+/fabric.properties
diff --git a/app/app.iml b/app/app.iml
index 0bfb19ce..a1dd8df0 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -72,9 +72,14 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v13/23.0.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/answers/1.3.6/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.4/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.8/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics/2.5.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.navercorp.pulltorefresh/library/3.3.0-SNAPSHOT/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.squareup.leakcanary/leakcanary-android/1.4-SNAPSHOT/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/de.keyboardsurfer.android.widget/crouton/1.8.5/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.10/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@@ -88,16 +93,21 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+ <excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/retrolambda" />
+ <excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
- <orderEntry type="library" exported="" name="guava-19.0-rc2" level="project" />
+ <orderEntry type="library" exported="" name="guava-19.0" level="project" />
<orderEntry type="library" exported="" name="leakcanary-android-1.4-SNAPSHOT" level="project" />
+ <orderEntry type="library" exported="" name="crashlytics-2.5.5" level="project" />
<orderEntry type="library" exported="" name="haha-2.0.2" level="project" />
<orderEntry type="library" exported="" name="library-3.3.0-SNAPSHOT" level="project" />
+ <orderEntry type="library" exported="" name="crashlytics-core-2.3.8" level="project" />
+ <orderEntry type="library" exported="" name="beta-1.1.4" level="project" />
<orderEntry type="library" exported="" name="activeandroid-3.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" exported="" name="leakcanary-watcher-1.4-SNAPSHOT" level="project" />
<orderEntry type="library" exported="" name="twitter4j-stream-4.0.4" level="project" />
@@ -105,9 +115,11 @@
<orderEntry type="library" exported="" name="crouton-1.8.5" level="project" />
<orderEntry type="library" exported="" name="twitter4j-media-support-4.0.4" level="project" />
<orderEntry type="library" exported="" name="support-v13-23.0.1" level="project" />
+ <orderEntry type="library" exported="" name="answers-1.3.6" level="project" />
<orderEntry type="library" exported="" name="leakcanary-analyzer-1.4-SNAPSHOT" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" />
<orderEntry type="library" exported="" name="twitter4j-core-4.0.4" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" />
+ <orderEntry type="library" exported="" name="fabric-1.3.10" level="project" />
</component>
</module> \ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index e57f7eb1..cb299d36 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'
// apply plugin: 'com.android.databinding'
apply plugin: 'me.tatarka.retrolambda'
+apply plugin: 'io.fabric'
android {
compileSdkVersion 23
@@ -21,11 +22,12 @@ android {
buildTypes {
debug {
applicationIdSuffix ".debug"
+ ext.enableCrashlytics = false
}
release {
+ applicationIdSuffix ".release"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- applicationIdSuffix ".release"
}
}
compileOptions {
@@ -65,11 +67,16 @@ dependencies {
// twitter-text
compile 'com.twitter:twitter-text:1.13.0'
// guava
- compile 'com.google.guava:guava:19.0-rc2'
+ compile 'com.google.guava:guava:19.0'
// LeakCanary
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-SNAPSHOT'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-SNAPSHOT'
+
+ // Fabric
+ compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
+ transitive = true;
+ }
}
retrolambda {
diff --git a/app/fabric.properties.example b/app/fabric.properties.example
new file mode 100644
index 00000000..14823a40
--- /dev/null
+++ b/app/fabric.properties.example
@@ -0,0 +1,2 @@
+apiKey=
+apiSecret=
diff --git a/app/src/main/java/net/lacolaco/smileessence/Application.java b/app/src/main/java/net/lacolaco/smileessence/Application.java
index b963aacd..3c365d3c 100644
--- a/app/src/main/java/net/lacolaco/smileessence/Application.java
+++ b/app/src/main/java/net/lacolaco/smileessence/Application.java
@@ -25,8 +25,11 @@
package net.lacolaco.smileessence;
import com.activeandroid.ActiveAndroid;
+import com.crashlytics.android.Crashlytics;
+import com.crashlytics.android.core.CrashlyticsCore;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
+import io.fabric.sdk.android.Fabric;
import net.lacolaco.smileessence.entity.Account;
import net.lacolaco.smileessence.logging.Logger;
import net.lacolaco.smileessence.preference.UserPreferenceHelper;
@@ -52,6 +55,7 @@ public class Application extends android.app.Application {
@Override
public void onCreate() {
super.onCreate();
+ Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build());
ActiveAndroid.initialize(this, true);
instance = this; // プロセスの寿命の間 1 度しか呼ばれないので安全
refWatcher = LeakCanary.install(this);
diff --git a/build.gradle b/build.gradle
index d1d6e345..ad92f7b9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,11 +4,13 @@ buildscript {
repositories {
jcenter()
mavenCentral()
+ maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
// classpath 'com.android.databinding:dataBinder:1.0-rc1' // is unusable
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
+ classpath 'io.fabric.tools:gradle:1.+'
}
}
@@ -17,5 +19,6 @@ allprojects {
jcenter()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
+ maven { url 'https://maven.fabric.io/public' }
}
}