Skip to content

Commit

Permalink
Enable Crashalytics
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasb committed Apr 18, 2014
1 parent 4890c8e commit d47d823
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ out/
proguard_logs/

.gradle/
com_crashlytics_export_strings.xml
key.c
local.properties
tags
Expand Down
3 changes: 3 additions & 0 deletions Veckify/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<meta-data
android:name="com.crashlytics.ApiKey"
android:value="7e5ca12581f003ad014744bd7429fe492767d531" />
</application>
</manifest>
9 changes: 9 additions & 0 deletions Veckify/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
buildscript {
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.8.1'
}
}

apply plugin: 'android'
apply plugin: 'crashlytics'

android {
buildToolsVersion "19.0.3"
Expand Down Expand Up @@ -37,9 +42,13 @@ android {
}
}

repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
compile project(':SpotifyLibrary')
compile project(':ActionBar')
compile project(':UndoBar')
compile project(':BetterTimePicker')
compile 'com.crashlytics.android:crashlytics:1.1.11'
}
2 changes: 1 addition & 1 deletion Veckify/src/com/wigwamlabs/veckify/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Application extends android.app.Application {
public void onCreate() {
Debug.logLifecycle("Application.onCreate()");
super.onCreate();
Debug.enableStrictMode();
Debug.initApplication(this);

mDb = new DataDatabaseAdapter(this);
}
Expand Down
6 changes: 5 additions & 1 deletion Veckify/src/com/wigwamlabs/veckify/Debug.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import android.os.StrictMode;
import android.util.Log;

import com.crashlytics.android.Crashlytics;

public final class Debug {
private static final String TAG = "Veckify";

static void enableStrictMode() {
static void initApplication(Application app) {
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll()
Expand All @@ -16,6 +18,8 @@ static void enableStrictMode() {
.detectAll()
.penaltyLog()
.build());
} else {
Crashlytics.start(app);
}
}

Expand Down

0 comments on commit d47d823

Please sign in to comment.