Skip to content

Commit 01839de

Browse files
authored
Adding multidex to support more method references (commons-app#3755)
* adding multidex to support more method references * add multidex version to gradle properties
1 parent 7084fd2 commit 01839de

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ dependencies {
121121
implementation "androidx.preference:preference:$PREFERENCE_VERSION"
122122
// Kotlin
123123
implementation "androidx.preference:preference-ktx:$PREFERENCE_VERSION"
124+
125+
implementation "androidx.multidex:multidex:$MULTIDEX_VERSION"
124126
}
125127

126128
android {
@@ -138,6 +140,8 @@ android {
138140
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
139141
testInstrumentationRunnerArguments clearPackageData: 'true'
140142

143+
multiDexEnabled true
144+
141145
testOptions {
142146
execution 'ANDROIDX_TEST_ORCHESTRATOR'
143147
}

app/src/main/java/fr/free/nrw/commons/CommonsApplication.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import android.os.Process;
1919
import android.util.Log;
2020
import androidx.annotation.NonNull;
21+
import androidx.multidex.MultiDexApplication;
2122
import com.facebook.drawee.backends.pipeline.Fresco;
2223
import com.facebook.imagepipeline.core.ImagePipeline;
2324
import com.facebook.imagepipeline.core.ImagePipelineConfig;
@@ -77,7 +78,7 @@
7778
resCommentPrompt = R.string.crash_dialog_comment_prompt
7879
)
7980

80-
public class CommonsApplication extends Application {
81+
public class CommonsApplication extends MultiDexApplication {
8182
@Inject SessionManager sessionManager;
8283
@Inject DBOpenHelper dbOpenHelper;
8384

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ DAGGER_VERSION=2.21
2323
ROOM_VERSION=2.2.3
2424
PREFERENCE_VERSION=1.1.0
2525
CORE_KTX_VERSION=1.2.0
26+
MULTIDEX_VERSION=2.0.1
2627

2728
systemProp.http.proxyPort=0
2829
systemProp.http.proxyHost=

0 commit comments

Comments
 (0)