test
This commit is contained in:
77
app/proguard-rules.pro
vendored
77
app/proguard-rules.pro
vendored
@@ -1,26 +1,61 @@
|
|||||||
# Add project specific ProGuard rules here.
|
# --- SCAN-WICH SECURITY RULES ---
|
||||||
# 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
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
# Optimisations agressives
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
-optimizationpasses 5
|
||||||
# class:
|
-allowaccessmodification
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
-mergeinterfacesaggressively
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
# Supprimer les informations de débogage
|
||||||
# debugging stack traces.
|
-renamesourcefileattribute SourceFile
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
# Offusquer plus profondément
|
||||||
# hide the original source file name.
|
-repackageclasses ''
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
|
|
||||||
# Obfuscation pour protéger les clés d'API
|
# --- FIREBASE / GOOGLE ---
|
||||||
-keep class com.example.scanwich.BuildConfig { *; }
|
# 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.**
|
-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