diff --git a/app/build.gradle b/app/build.gradle index 4aaad85c2..9ec9103e0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -121,6 +121,8 @@ dependencies { implementation "androidx.preference:preference:$PREFERENCE_VERSION" // Kotlin implementation "androidx.preference:preference-ktx:$PREFERENCE_VERSION" + + implementation "androidx.multidex:multidex:$MULTIDEX_VERSION" } android { @@ -138,6 +140,8 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments clearPackageData: 'true' + multiDexEnabled true + testOptions { execution 'ANDROIDX_TEST_ORCHESTRATOR' } diff --git a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java index b2f281dd5..eb8cebb6d 100644 --- a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java +++ b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java @@ -18,6 +18,7 @@ import android.os.Build; import android.os.Process; import android.util.Log; import androidx.annotation.NonNull; +import androidx.multidex.MultiDexApplication; import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.imagepipeline.core.ImagePipeline; import com.facebook.imagepipeline.core.ImagePipelineConfig; @@ -77,7 +78,7 @@ import timber.log.Timber; resCommentPrompt = R.string.crash_dialog_comment_prompt ) -public class CommonsApplication extends Application { +public class CommonsApplication extends MultiDexApplication { @Inject SessionManager sessionManager; @Inject DBOpenHelper dbOpenHelper; diff --git a/gradle.properties b/gradle.properties index 980048fe6..5849f65ad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,6 +23,7 @@ DAGGER_VERSION=2.21 ROOM_VERSION=2.2.3 PREFERENCE_VERSION=1.1.0 CORE_KTX_VERSION=1.2.0 +MULTIDEX_VERSION=2.0.1 systemProp.http.proxyPort=0 systemProp.http.proxyHost=