Skip to content

Commit

Permalink
Use multidex for all build types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne committed Oct 18, 2020
1 parent a73baf3 commit 66ba8d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ android {
versionCode 955
versionName "0.20.1"

multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

Expand All @@ -28,7 +30,6 @@ android {

buildTypes {
debug {
multiDexEnabled true
debuggable true

// suffix the app id and the app name with git branch name
Expand Down Expand Up @@ -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'
Expand Down
7 changes: 0 additions & 7 deletions app/src/debug/java/org/schabi/newpipe/DebugApp.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/schabi/newpipe/App.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.schabi.newpipe;

import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
Expand All @@ -9,6 +8,7 @@
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;

import com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache;
Expand Down Expand Up @@ -61,7 +61,7 @@
* 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;

Expand Down

0 comments on commit 66ba8d5

Please sign in to comment.