diff --git a/app/build.gradle b/app/build.gradle index ab4808bf..7faa0dd0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,9 @@ apply plugin: 'com.android.application' +if (buildInRelease()){ + apply plugin: 'io.fabric' +} + android { compileSdkVersion 27 buildToolsVersion "27.0.3" @@ -33,11 +37,12 @@ dependencies { implementation 'com.android.support:support-v4:27.1.1' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support:recyclerview-v7:27.1.1' - implementation 'com.google.firebase:firebase-crash:12.0.1' + implementation 'com.google.firebase:firebase-core:15.0.0' + implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1' implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' - implementation 'org.jsoup:jsoup:1.10.3' //Warning: upgrading from 1.10.3 will break stuff! + implementation 'org.jsoup:jsoup:1.10.3' //TODO: Warning: upgrading from 1.10.3 will break stuff! implementation 'com.github.franmontiel:PersistentCookieJar:v1.0.1' implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3' implementation("com.mikepenz:materialdrawer:6.0.7@aar") { @@ -46,11 +51,15 @@ dependencies { implementation 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar' implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.12' - implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1' //TODO: Deprecated - needs replacement! + implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1' //TODO: needs replacement implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2' implementation 'com.jakewharton.timber:timber:4.7.0' } -if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")){ +if (buildInRelease()){ apply plugin: 'com.google.gms.google-services' } + +def buildInRelease() { + return getGradle().getStartParameter().getTaskRequests().toString().contains("Release") +} diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java b/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java index a3407254..c4674134 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java @@ -2,7 +2,7 @@ package gr.thmmy.mthmmy.utils; import android.util.Log; -import com.google.firebase.crash.FirebaseCrash; +import com.crashlytics.android.Crashlytics; import timber.log.Timber.DebugTree; @@ -25,14 +25,14 @@ public class CrashReportingTree extends DebugTree { else level = 'A'; - FirebaseCrash.log(level + "/" + tag + ": " + message); + Crashlytics.log(level + "/" + tag + ": " + message); if(priority == Log.ERROR) { if (t!=null) - FirebaseCrash.report(t); + Crashlytics.logException(t); else - FirebaseCrash.report(new Exception(message)); + Crashlytics.logException(new Exception(message)); } } diff --git a/build.gradle b/build.gradle index c7eceb56..c9e5f745 100644 --- a/build.gradle +++ b/build.gradle @@ -5,13 +5,13 @@ buildscript { jcenter() maven { url "https://jitpack.io" } maven { url "https://maven.google.com" } + maven { url "https://maven.fabric.io/public" } google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.1' - classpath 'com.google.gms:google-services:3.1.1' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'com.google.gms:google-services:3.2.0' + classpath 'io.fabric.tools:gradle:1.25.1' } }