Use multidex for all build types.

This commit is contained in:
Isira Seneviratne 2020-10-18 14:14:27 +05:30
parent a73baf32f1
commit 66ba8d56b7
3 changed files with 5 additions and 11 deletions

View File

@ -16,6 +16,8 @@ android {
versionCode 955
versionName "0.20.1"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@ -28,7 +30,6 @@ android {
buildTypes {
debug {
multiDexEnabled true
debuggable true
// suffix the app id and the app name with git branch name
@ -157,7 +158,7 @@ dependencies {
debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakCanaryVersion}"
implementation "com.squareup.leakcanary:leakcanary-object-watcher-android:${leakCanaryVersion}"
debugImplementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.multidex:multidex:2.0.1"
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-core:3.3.3'

View File

@ -1,6 +1,5 @@
package org.schabi.newpipe
import androidx.multidex.MultiDex
import androidx.preference.PreferenceManager
import com.facebook.stetho.Stetho
import com.facebook.stetho.okhttp3.StethoInterceptor
@ -28,12 +27,6 @@ class DebugApp : App() {
return downloader
}
override fun initACRA() {
// install MultiDex before initializing ACRA
MultiDex.install(this)
super.initACRA()
}
private fun initStetho() {
// Create an InitializerBuilder
val initializerBuilder = Stetho.newInitializerBuilder(this)

View File

@ -1,6 +1,5 @@
package org.schabi.newpipe;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
@ -9,6 +8,7 @@ import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;
import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache;
@ -61,7 +61,7 @@ import io.reactivex.plugins.RxJavaPlugins;
* along with NewPipe. If not, see <http://www.gnu.org/licenses/>.
*/
public class App extends Application {
public class App extends MultiDexApplication {
protected static final String TAG = App.class.toString();
private static App app;