Commit 0dbe191d authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Add Firebase with Crashlytics.

parent 7654831f
......@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
apply from: '../ci.gradle'
android {
......@@ -56,7 +57,6 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix '.debugPG'
versionNameSuffix ' debugPG'
}
......@@ -120,6 +120,10 @@ dependencies {
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
//FlexBox Layout
implementation 'com.google.android:flexbox:1.0.0'
//Firebase
implementation 'com.google.firebase:firebase-core:16.0.3'
//Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
//JUnit
testImplementation "junit:junit:4.12"
......@@ -133,4 +137,6 @@ configurations.all {
resolutionStrategy {
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
}
}
\ No newline at end of file
}
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
......@@ -2,7 +2,9 @@ package ru.terrakok.gitlabclient
import android.app.Application
import android.graphics.Color
import com.crashlytics.android.Crashlytics
import com.jakewharton.threetenabp.AndroidThreeTen
import io.fabric.sdk.android.Fabric
import ru.noties.markwon.SpannableConfiguration
import ru.noties.markwon.spans.SpannableTheme
import ru.terrakok.gitlabclient.model.data.auth.AuthHolder
......@@ -24,6 +26,7 @@ class App : Application() {
super.onCreate()
initLogger()
initFabric()
initToothpick()
initAppScope()
initMarkwon()
......@@ -36,6 +39,15 @@ class App : Application() {
}
}
private fun initFabric() {
Fabric.with(
Fabric.Builder(this)
.kits(Crashlytics())
.debuggable(BuildConfig.DEBUG)
.build()
)
}
private fun initToothpick() {
if (BuildConfig.DEBUG) {
Toothpick.setConfiguration(Configuration.forDevelopment().preventMultipleRootScopes())
......
......@@ -3,10 +3,14 @@ buildscript {
repositories {
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.google.gms:google-services:4.0.1'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment