diff --git a/app/build.gradle b/app/build.gradle index be6b580536e1c6fd99b0409c3333af5edf6029ea..dacbb1efbc8af4d5196d27a731cfa33339ace20e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -86,7 +86,9 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.4.1' implementation "androidx.constraintlayout:constraintlayout:2.1.3" implementation 'com.google.android.material:material:1.6.0' - implementation 'com.github.bumptech.glide:glide:4.13.1' + implementation 'com.github.bumptech.glide:glide:4.14.2' + implementation 'com.github.bumptech.glide:annotations:4.14.2' + annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2' implementation "androidx.work:work-runtime:2.7.1" implementation 'androidx.test:core:1.4.0' implementation 'com.jakewharton.timber:timber:5.0.1' diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index f1b424510da51fd82143bc74a0a801ae5a1e2fcd..e251250ee801cfa194322d12e7b87f088055c8eb 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -19,3 +19,17 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile +-keep public class * implements com.bumptech.glide.module.GlideModule +-keep class * extends com.bumptech.glide.module.AppGlideModule { + (...); +} +-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { + **[] $VALUES; + public *; +} +-keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder { + *** rewind(); +} + +# Uncomment for DexGuard only +#-keepresourcexmlelements manifest/application/meta-data@value=GlideModule \ No newline at end of file diff --git a/app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java b/app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java new file mode 100644 index 0000000000000000000000000000000000000000..15f6dac80cbfdfb407fa26622991b6fc10013b27 --- /dev/null +++ b/app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java @@ -0,0 +1,36 @@ +/* + * Copyright MURENA SAS 2022 + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package foundation.e.drive.configurations; + +import android.content.Context; +import android.util.Log; + +import androidx.annotation.NonNull; + +import com.bumptech.glide.GlideBuilder; +import com.bumptech.glide.annotation.GlideModule; +import com.bumptech.glide.module.AppGlideModule; + +@GlideModule +public class ApplicationGlideModule extends AppGlideModule { + + @Override + public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) { + super.applyOptions(context, builder); + builder.setLogLevel(Log.ERROR); + } +}