Use MultiDex

This commit is contained in:
Stefan Niedermann 2020-10-11 17:49:41 +02:00
parent 7a6c7cf944
commit f699340b7c
5 changed files with 14 additions and 4 deletions

View file

@ -15,6 +15,7 @@ android {
targetSdkVersion 29
versionCode 2017001
versionName "2.17.1"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@ -57,7 +58,7 @@ android {
dependencies {
// Nextcloud SSO
implementation "com.github.nextcloud:Android-SingleSignOn:0.5.3"
implementation 'com.github.stefan-niedermann.nextcloud-commons:sso-glide:0.0.3'
implementation 'com.github.stefan-niedermann.nextcloud-commons:sso-glide:0.0.5'
// Glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
@ -76,6 +77,8 @@ dependencies {
implementation 'androidx.work:work-runtime:2.4.0'
implementation "com.google.android.material:material:1.2.1"
implementation 'androidx.multidex:multidex:2.0.1'
// Testing
testImplementation 'junit:junit:4.13'
androidTestImplementation 'com.android.support:support-annotations:28.0.0'

View file

@ -11,6 +11,7 @@ import androidx.preference.PreferenceManager;
import it.niedermann.owncloud.notes.preferences.DarkModeSetting;
import static androidx.multidex.MultiDex.install;
import static androidx.preference.PreferenceManager.getDefaultSharedPreferences;
public class NotesApplication extends Application {
@ -33,6 +34,12 @@ public class NotesApplication extends Application {
super.onCreate();
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
install(this);
}
public static void setAppTheme(DarkModeSetting setting) {
AppCompatDelegate.setDefaultNightMode(setting.getModeId());
}

View file

@ -10,7 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import it.niedermann.android.glidesso.SingleSignOnUrl;
import it.niedermann.nextcloud.sso.glide.SingleSignOnUrl;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
import it.niedermann.owncloud.notes.shared.model.LocalAccount;

View file

@ -12,7 +12,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import it.niedermann.android.glidesso.SingleSignOnUrl;
import it.niedermann.nextcloud.sso.glide.SingleSignOnUrl;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
import it.niedermann.owncloud.notes.shared.model.LocalAccount;

View file

@ -8,7 +8,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import it.niedermann.android.glidesso.SingleSignOnUrl;
import it.niedermann.nextcloud.sso.glide.SingleSignOnUrl;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.databinding.ItemAccountChooseBinding;
import it.niedermann.owncloud.notes.shared.model.LocalAccount;