Proguard
This commit is contained in:
parent
55d1529c65
commit
e7b38b2b1d
4 changed files with 31 additions and 2 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }}
|
||||
if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ fun Project.configureBaseExtension() {
|
|||
versionName = appVerName
|
||||
if (localProperties.getProperty("buildWithGitSuffix").toBoolean())
|
||||
versionNameSuffix = ".r${gitCommitCount}.${gitCommitHash}"
|
||||
|
||||
consumerProguardFiles("proguard-rules.pro")
|
||||
}
|
||||
|
||||
val signingCfg = signingConfigs.create("config") {
|
||||
|
|
|
|||
27
common/proguard-rules.pro
vendored
27
common/proguard-rules.pro
vendored
|
|
@ -1,2 +1,29 @@
|
|||
# Keep `Companion` object fields of serializable classes.
|
||||
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
|
||||
-if @kotlinx.serialization.Serializable class **
|
||||
-keepclassmembers class <1> {
|
||||
static <1>$Companion Companion;
|
||||
}
|
||||
|
||||
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
|
||||
-if @kotlinx.serialization.Serializable class ** {
|
||||
static **$* *;
|
||||
}
|
||||
-keepclassmembers class <2>$<3> {
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# Keep `INSTANCE.serializer()` of serializable objects.
|
||||
-if @kotlinx.serialization.Serializable class ** {
|
||||
public static ** INSTANCE;
|
||||
}
|
||||
-keepclassmembers class <1> {
|
||||
public static <1> INSTANCE;
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
|
||||
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
|
||||
|
||||
-keep class icu.nullptr.hidemyapplist.common.JsonConfig { *; }
|
||||
-keep class icu.nullptr.hidemyapplist.common.JsonConfig$* { *; }
|
||||
|
|
|
|||
2
xposed/proguard-rules.pro
vendored
2
xposed/proguard-rules.pro
vendored
|
|
@ -1 +1 @@
|
|||
-keep class icu.nullptr.hidemyapplist.xposed.XposedEntry
|
||||
-keep class icu.nullptr.hidemyapplist.xposed.XposedEntry { *; }
|
||||
|
|
|
|||
Reference in a new issue