From 33df35db1b4c0536d0c651aaf6917e803875b669 Mon Sep 17 00:00:00 2001 From: len Date: Sat, 15 Oct 2016 11:12:16 +0200 Subject: [PATCH] Multidex debug build --- app/build.gradle | 4 ++++ app/src/main/java/eu/kanade/tachiyomi/App.kt | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 221c811125..3afa7c6c0a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,10 +61,12 @@ android { debug { versionNameSuffix "-${getCommitCount()}" applicationIdSuffix ".debug" + multiDexEnabled true } release { minifyEnabled true shrinkResources true + multiDexEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -104,6 +106,8 @@ dependencies { compile "com.android.support:support-annotations:$support_library_version" compile "com.android.support:customtabs:$support_library_version" + compile 'com.android.support:multidex:1.0.1' + compile 'com.google.android.gms:play-services-gcm:9.6.1' // ReactiveX diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 8103fb5f13..cd2508196d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -1,6 +1,8 @@ package eu.kanade.tachiyomi import android.app.Application +import android.content.Context +import android.support.multidex.MultiDex import org.acra.ACRA import org.acra.annotation.ReportsCrashes import timber.log.Timber @@ -27,6 +29,13 @@ open class App : Application() { setupAcra() } + override fun attachBaseContext(base: Context) { + super.attachBaseContext(base) + if (BuildConfig.DEBUG) { + MultiDex.install(this) + } + } + protected open fun setupAcra() { ACRA.init(this) }