Skip to content

Commit

Permalink
Remove Multidex usages
Browse files Browse the repository at this point in the history
Since the min SDK is 21, it is no longer necessary to use the Multidex library.

See the following for more info: developer.android.com/build/multidex#mdex-on-l
  • Loading branch information
MGaetan89 committed Oct 11, 2024
1 parent 68d2504 commit b195b3a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ git clone https://github.com/dimagi/commcare-core.git
- Click "OK" to use the Gradle wrapper
- Wait while Android Studio spins its wheels
- Download any build dependencies that the SDK Manager tells you you need.
- Disable _Instant Run_ found in Settings > Build, Execution, Deployment > Instant Run. (It does not play well with multidexing, which we have enabled, or with some of the processes we have set up for Google Services)

## Building

Expand Down
4 changes: 0 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ dependencies {
testImplementation('org.robolectric:robolectric:4.8.2') {
exclude(group: 'org.bouncycastle', module: 'bcprov-jdk15on')
}
testImplementation 'org.robolectric:shadows-multidex:4.8.2'
testImplementation 'androidx.test:core:1.5.0'
testImplementation 'androidx.test:runner:1.5.2'
testImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down Expand Up @@ -75,7 +74,6 @@ dependencies {
implementation (name: 'volley-1.1.0', ext: 'aar')
implementation (name: 'storage-2.1.0', ext: 'aar')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
Expand Down Expand Up @@ -251,7 +249,6 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
multiDexEnabled true
applicationId 'org.commcare.dalvik'
testNamespace 'org.commcare.dalvik.test'

Expand Down Expand Up @@ -462,7 +459,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
testProguardFiles 'test-proguard.cfg'

multiDexKeepProguard file('proguard-multidex.pro')
// enable crashlytics
buildConfigField 'boolean', 'USE_CRASHLYTICS', 'true'
ext.enableCrashlytics = true
Expand Down
2 changes: 0 additions & 2 deletions app/proguard-multidex.pro

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/org/commcare/CommCareApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.app.Application;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
Expand All @@ -17,7 +18,6 @@
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;
import androidx.work.BackoffPolicy;
import androidx.work.Constraints;
Expand Down Expand Up @@ -143,7 +143,7 @@
import okhttp3.MultipartBody;
import okhttp3.RequestBody;

public class CommCareApplication extends MultiDexApplication {
public class CommCareApplication extends Application {

private static final String TAG = CommCareApplication.class.getSimpleName();

Expand Down

0 comments on commit b195b3a

Please sign in to comment.