helios-alarm-clock/app/proguard-rules.pro
Moritz 6032e9fd07 Production cleanup: enable R8, add ProGuard rules, validate API input
- Enable R8 minification and resource shrinking for release builds
- Add ProGuard keep rules for Ktor, kotlinx.serialization, Room
- Validate hour/minute range in POST /set endpoint
- Guard wake lock release on server start failure
- Remove unused template colors from colors.xml
- Rewrite README with curl examples, security note, troubleshooting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:10:41 +01:00

27 lines
927 B
Prolog

# Ktor keep CIO engine and routing
-keep class io.ktor.** { *; }
-keepclassmembers class io.ktor.** { *; }
-dontwarn io.ktor.**
# kotlinx.serialization keep @Serializable classes
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt
-keepclassmembers @kotlinx.serialization.Serializable class ** {
*** Companion;
}
-keepclasseswithmembers class ** {
kotlinx.serialization.KSerializer serializer(...);
}
-keep,includedescriptorclasses class com.example.helios_alarm_clock.**$$serializer { *; }
-keepclassmembers class com.example.helios_alarm_clock.** {
*** Companion;
}
-keepclasseswithmembers class com.example.helios_alarm_clock.** {
kotlinx.serialization.KSerializer serializer(...);
}
# Room keep entities
-keep class com.example.helios_alarm_clock.data.AlarmEntity { *; }
# SLF4J (Ktor dependency) suppress missing impl warnings
-dontwarn org.slf4j.**