proguard-rules.pro 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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.weather.presentation.WeatherViewModel_HiltModules$* { *; }
  23. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_Factory { *; }
  24. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_MembersInjector { *; }
  25. # Keep specific Hilt ViewModel components
  26. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_HiltModules$BindsModule { *; }
  27. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_HiltModules$KeyModule { *; }
  28. # Keep Hilt ViewModel factory and members injector
  29. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_Factory { *; }
  30. -keep class com.codeskraps.feature.weather.presentation.WeatherViewModel_MembersInjector { *; }
  31. # Keep Koin module classes
  32. -keep class com.codeskraps.feature.weather.di.** { *; }
  33. -keep class com.codeskraps.feature.weather.di.FeatureModuleKt { *; }
  34. # Keep Compose screen classes
  35. -keep class com.codeskraps.feature.weather.presentation.components.** { *; }
  36. -keep class com.codeskraps.feature.weather.presentation.components.WeatherScreenKt { *; }
  37. -keep class com.codeskraps.feature.weather.presentation.components.WeatherScreenKt$* { *; }
  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.weather.data.remote.** { *; }
  47. -keep class com.codeskraps.feature.weather.data.remote.WeatherDto { *; }
  48. -keep class com.codeskraps.feature.weather.data.remote.WeatherDto$* { *; }
  49. -keep class com.squareup.moshi.** { *; }
  50. -keep class com.squareup.moshi.internal.** { *; }
  51. -keep class com.squareup.moshi.internal.Util { *; }
  52. -keep class com.squareup.moshi.internal.Util$* { *; }
  53. # Keep Moshi annotations
  54. -keepattributes *Annotation*
  55. -keepattributes Signature
  56. -keepattributes InnerClasses
  57. -keepattributes EnclosingMethod
  58. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations, RuntimeVisibleTypeAnnotations
  59. # Keep Retrofit-related classes
  60. -keep class retrofit2.** { *; }
  61. -keep class okhttp3.** { *; }
  62. -keep class okio.** { *; }
  63. # Less aggressive obfuscation
  64. -keepnames class com.codeskraps.feature.weather.** { *; }
  65. -keepnames class com.codeskraps.feature.weather.data.** { *; }
  66. -keepnames class com.codeskraps.feature.weather.domain.** { *; }
  67. -keepnames class com.codeskraps.feature.weather.presentation.** { *; }
  68. # Keep Kotlin metadata
  69. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations, RuntimeVisibleTypeAnnotations
  70. -keepattributes *Annotation*
  71. -keepattributes Signature
  72. -keepattributes InnerClasses
  73. -keepattributes EnclosingMethod
  74. # Keep Kotlin coroutines
  75. -keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
  76. -keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}