changes #5
77
app/proguard-rules.pro
vendored
77
app/proguard-rules.pro
vendored
@@ -1,26 +1,61 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
# --- SCAN-WICH SECURITY RULES ---
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
# Optimisations agressives
|
||||
-optimizationpasses 5
|
||||
-allowaccessmodification
|
||||
-mergeinterfacesaggressively
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
# Supprimer les informations de débogage
|
||||
-renamesourcefileattribute SourceFile
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
# Offusquer plus profondément
|
||||
-repackageclasses ''
|
||||
|
||||
# Obfuscation pour protéger les clés d'API
|
||||
-keep class com.example.scanwich.BuildConfig { *; }
|
||||
# --- FIREBASE / GOOGLE ---
|
||||
# Les bibliothèques Google fournissent leurs propres règles optimisées.
|
||||
-dontwarn com.google.firebase.**
|
||||
-dontwarn com.google.android.gms.**
|
||||
-dontwarn com.google.errorprone.annotations.**
|
||||
|
||||
# --- ITEXT ---
|
||||
# On cible plus précisément les packages iText utilisés pour le rapport PDF
|
||||
-dontwarn com.itextpdf.**
|
||||
-keep class com.itextpdf.** { *; }
|
||||
-keep class com.itextpdf.kernel.** { public protected *; }
|
||||
-keep class com.itextpdf.layout.** { public protected *; }
|
||||
-keep class com.itextpdf.io.** { public protected *; }
|
||||
|
||||
# --- RETROFIT / OKHTTP ---
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
||||
|
||||
# Garder uniquement les annotations Retrofit
|
||||
-keep @interface retrofit2.http.*
|
||||
-dontwarn retrofit2.**
|
||||
# Note: On laisse Retrofit gérer ses propres règles internes (incluses dans l'AAR)
|
||||
|
||||
# --- ROOM ---
|
||||
# On ne garde que les classes liées à la base de données
|
||||
-keep class * extends androidx.room.RoomDatabase
|
||||
-dontwarn androidx.room.paging.**
|
||||
|
||||
# --- DATA MODELS ---
|
||||
# Crucial : On garde tout ce qui est nécessaire au parsing JSON et à Room
|
||||
-keepclassmembers class com.example.scanwich.** {
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
@androidx.room.PrimaryKey <fields>;
|
||||
}
|
||||
|
||||
-keep @androidx.room.Entity class com.example.scanwich.** { *; }
|
||||
|
||||
# On liste explicitement les modèles pour plus de précision
|
||||
-keep class com.example.scanwich.Meal { *; }
|
||||
-keep class com.example.scanwich.SportActivity { *; }
|
||||
-keep class com.example.scanwich.Glycemia { *; }
|
||||
-keep class com.example.scanwich.FavoriteMeal { *; }
|
||||
-keep class com.example.scanwich.N8nMealRequest { *; }
|
||||
-keep class com.example.scanwich.StravaActivity { *; }
|
||||
-keep class com.example.scanwich.StravaTokenResponse { *; }
|
||||
|
||||
# --- CONFIGURATION ---
|
||||
-keep class com.example.scanwich.BuildConfig { *; }
|
||||
|
||||
Reference in New Issue
Block a user