Skip to content

Commit f755d91

Browse files
author
Hussein Habibi Juybari
committed
Update Proguard rules to silence warnings and keep essential classes for Ktor and LogTap
1 parent 89deb78 commit f755d91

2 files changed

Lines changed: 16 additions & 19 deletions

File tree

LogTap/consumer-rules.pro

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# Suppress SLF4J binding warnings (not needed on Android)
2-
-dontwarn org.slf4j.impl.StaticLoggerBinder
1+
# --- Silence JDK management API on Android (used by Ktor debug detector)
2+
-dontwarn java.lang.management.**
3+
-dontwarn io.ktor.util.debug.**
4+
5+
# --- SLF4J binder (not used on Android)
6+
-dontwarn org.slf4j.impl.StaticLoggerBinder
7+
8+
# --- Keep essentials already in your rules (repeat if not present)
9+
-keep class com.github.husseinhj.logtap.** { *; }
10+
-keep class io.ktor.** { *; }
11+
-dontwarn io.ktor.**
12+
-dontwarn okhttp3.**
13+
-dontwarn okio.**
14+
-dontwarn kotlinx.coroutines.**
15+
-keepclassmembers class ** { @kotlinx.serialization.SerialName *; }
16+
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions, SourceFile, LineNumberTable

LogTap/proguard-rules.pro

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,3 @@
1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
2121
#-renamesourcefileattribute SourceFile
22-
23-
# Keep LogTap public API (and avoid accidental stripping of handlers)
24-
-keep class com.github.husseinhj.logtap.** { *; }
25-
26-
# Ktor / OkHttp / Coroutines are reflection-light but can warn
27-
-keep class io.ktor.** { *; }
28-
-dontwarn io.ktor.**
29-
-dontwarn okhttp3.**
30-
-dontwarn okio.**
31-
32-
-dontwarn kotlinx.coroutines.**
33-
34-
# If using kotlinx-serialization anywhere in your payloads
35-
-keepclassmembers class ** {
36-
@kotlinx.serialization.SerialName *;
37-
}
38-
-keepattributes *Annotation*, Signature, InnerClasses, EnclosingMethod, Exceptions, SourceFile, LineNumberTable

0 commit comments

Comments
 (0)