Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use multidex for all build types. #4557

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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