正在显示
4 个修改的文件
包含
37 行增加
和
24 行删除
| 1 | +# Kotlin Serialization Proguard Rules | ||
| 2 | +######################################## | ||
| 3 | + | ||
| 4 | +-keepattributes *Annotation*, InnerClasses | ||
| 5 | +-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations | ||
| 6 | + | ||
| 7 | +# kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer | ||
| 8 | +-keepclassmembers class kotlinx.serialization.json.** { | ||
| 9 | + *** Companion; | ||
| 10 | +} | ||
| 11 | +-keepclasseswithmembers class kotlinx.serialization.json.** { | ||
| 12 | + kotlinx.serialization.KSerializer serializer(...); | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +-keep,includedescriptorclasses class io.livekit.android.**$$serializer { *; } | ||
| 16 | +-keepclassmembers class io.livekit.android.** { | ||
| 17 | + *** Companion; | ||
| 18 | +} | ||
| 19 | +-keepclasseswithmembers class io.livekit.android.** { | ||
| 20 | + kotlinx.serialization.KSerializer serializer(...); | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +# WebRTC | ||
| 24 | +######################################### | ||
| 25 | +-keep class org.webrtc.** { *; } | ||
| 26 | + | ||
| 27 | +# Protobuf | ||
| 28 | +######################################### | ||
| 29 | +-keep class * extends com.google.protobuf.GeneratedMessageLite { *; } |
| @@ -20,27 +20,6 @@ | @@ -20,27 +20,6 @@ | ||
| 20 | # hide the original source file name. | 20 | # hide the original source file name. |
| 21 | #-renamesourcefileattribute SourceFile | 21 | #-renamesourcefileattribute SourceFile |
| 22 | 22 | ||
| 23 | -# Kotlin Serialization Proguard Rules | ||
| 24 | -######################################## | ||
| 25 | - | ||
| 26 | --keepattributes *Annotation*, InnerClasses | ||
| 27 | --dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations | ||
| 28 | - | ||
| 29 | -# kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer | ||
| 30 | --keepclassmembers class kotlinx.serialization.json.** { | ||
| 31 | - *** Companion; | ||
| 32 | -} | ||
| 33 | --keepclasseswithmembers class kotlinx.serialization.json.** { | ||
| 34 | - kotlinx.serialization.KSerializer serializer(...); | ||
| 35 | -} | ||
| 36 | - | ||
| 37 | -# Change here com.yourcompany.yourpackage | ||
| 38 | --keep,includedescriptorclasses class io.livekit.android.**$$serializer { *; } # <-- change package name to your app's | ||
| 39 | --keepclassmembers class io.livekit.android.** { # <-- change package name to your app's | ||
| 40 | - *** Companion; | ||
| 41 | -} | ||
| 42 | --keepclasseswithmembers class io.livekit.android.** { # <-- change package name to your app's | ||
| 43 | - kotlinx.serialization.KSerializer serializer(...); | ||
| 44 | -} | ||
| 45 | - | ||
| 46 | --keep class * extends com.google.protobuf.GeneratedMessageLite { *; } | ||
| 23 | +############################################################################# | ||
| 24 | +# NOTE: Any rules should probably be applied to consumer-rules.pro instead. # | ||
| 25 | +############################################################################# |
| @@ -11,6 +11,7 @@ android { | @@ -11,6 +11,7 @@ android { | ||
| 11 | targetSdk androidSdk.targetVersion | 11 | targetSdk androidSdk.targetVersion |
| 12 | versionCode 1 | 12 | versionCode 1 |
| 13 | versionName "1.0" | 13 | versionName "1.0" |
| 14 | + consumerProguardFiles 'consumer-rules.pro' | ||
| 14 | 15 | ||
| 15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 16 | } | 17 | } |
sample-app-common/consumer-rules.pro
0 → 100644
-
请 注册 或 登录 后发表评论