proguard-rules.pro 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Add project specific ProGuard rules here.
  2. # You can control the set of applied configuration files using the
  3. # proguardFiles setting in build.gradle.
  4. #
  5. # For more details, see
  6. # http://developer.android.com/guide/developing/tools/proguard.html
  7. # If your project uses WebView with JS, uncomment the following
  8. # and specify the fully qualified class name to the JavaScript interface
  9. # class:
  10. #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  11. # public *;
  12. #}
  13. # Uncomment this to preserve the line number information for
  14. # debugging stack traces.
  15. -keepattributes SourceFile,LineNumberTable
  16. # If you keep the line number information, uncomment this to
  17. # hide the original source file name.
  18. #-renamesourcefileattribute SourceFile
  19. # Added to fix R8 warning for missing StringConcatFactory
  20. -dontwarn java.lang.invoke.StringConcatFactory
  21. # Keep Hilt generated classes
  22. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_HiltModules$* { *; }
  23. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_Factory { *; }
  24. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_MembersInjector { *; }
  25. # Keep specific Hilt ViewModel components
  26. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_HiltModules$BindsModule { *; }
  27. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_HiltModules$KeyModule { *; }
  28. # Keep Hilt ViewModel factory and members injector
  29. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_Factory { *; }
  30. -keep class com.codeskraps.feature.geocoding.presentation.GeocodingViewModel_MembersInjector { *; }
  31. # Keep Koin module classes
  32. -keep class com.codeskraps.feature.geocoding.di.** { *; }
  33. -keep class com.codeskraps.feature.geocoding.di.FeatureModuleKt { *; }
  34. # Keep Compose screen classes
  35. -keep class com.codeskraps.feature.geocoding.presentation.components.** { *; }
  36. -keep class com.codeskraps.feature.geocoding.presentation.components.GeocodingScreenKt { *; }
  37. -keep class com.codeskraps.feature.geocoding.presentation.components.GeocodingScreenKt$* { *; }
  38. # Keep Compose-related classes
  39. -keep class androidx.compose.** { *; }
  40. -keep class androidx.compose.runtime.** { *; }
  41. -keep class androidx.compose.ui.** { *; }
  42. -keep class androidx.compose.foundation.** { *; }
  43. -keep class androidx.compose.material.** { *; }
  44. -keep class androidx.compose.material3.** { *; }
  45. # Keep Moshi-related classes
  46. -keep class com.codeskraps.feature.geocoding.data.remote.** { *; }
  47. -keep class com.squareup.moshi.** { *; }
  48. -keep class com.squareup.moshi.internal.** { *; }
  49. -keep class com.squareup.moshi.internal.Util { *; }
  50. -keep class com.squareup.moshi.internal.Util$* { *; }
  51. # Keep Moshi annotations
  52. -keepattributes *Annotation*
  53. -keepattributes Signature
  54. -keepattributes InnerClasses
  55. -keepattributes EnclosingMethod
  56. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations, RuntimeVisibleTypeAnnotations
  57. # Keep Retrofit-related classes
  58. -keep class retrofit2.** { *; }
  59. -keep class okhttp3.** { *; }
  60. -keep class okio.** { *; }
  61. # Less aggressive obfuscation
  62. -keepnames class com.codeskraps.feature.geocoding.** { *; }
  63. -keepnames class com.codeskraps.feature.geocoding.data.** { *; }
  64. -keepnames class com.codeskraps.feature.geocoding.domain.** { *; }
  65. -keepnames class com.codeskraps.feature.geocoding.presentation.** { *; }
  66. # Keep Kotlin metadata
  67. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations, RuntimeVisibleTypeAnnotations
  68. -keepattributes *Annotation*
  69. -keepattributes Signature
  70. -keepattributes InnerClasses
  71. -keepattributes EnclosingMethod
  72. # Keep Kotlin coroutines
  73. -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
  74. -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}