Skip to content

Commit

Permalink
优化 jitpack 打包(3)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojinzi123 committed Nov 10, 2024
1 parent 6655d13 commit 8bc1666
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Demo/app1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
buildTypes {
debug {
minifyEnabled = false
signingConfig signingConfigs.release
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (Boolean.parseBoolean(project.findProperty("support.isIncludeKspFolder"))) {
kotlin {
Expand All @@ -54,7 +54,7 @@ android {
}
release {
minifyEnabled true
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 2 additions & 0 deletions Demo/app1/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontwarn javax.annotation.Nullable

-dontwarn org.reactivestreams.FlowAdapters
-dontwarn org.reactivestreams.**
-dontwarn java.util.concurrent.flow.**
Expand Down
4 changes: 2 additions & 2 deletions Demo/app2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
buildTypes {
debug {
minifyEnabled = false
signingConfig signingConfigs.release
signingConfig signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (Boolean.parseBoolean(project.findProperty("support.isIncludeKspFolder"))) {
kotlin {
Expand All @@ -54,7 +54,7 @@ android {
}
release {
minifyEnabled true
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
24 changes: 23 additions & 1 deletion Demo/app2/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,26 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-dontwarn javax.annotation.Nullable

-dontwarn org.reactivestreams.FlowAdapters
-dontwarn org.reactivestreams.**
-dontwarn java.util.concurrent.flow.**
-dontwarn java.util.concurrent.**

# 小金子组件化框架 不要警告
-dontwarn com.xiaojinzi.component.**
# 所有本包下面的类和接口都不混淆
-keep class com.xiaojinzi.component.** {*;}
-keep interface com.xiaojinzi.component.** {*;}
# 这两条是让路由 Api 不混淆
-keep @com.xiaojinzi.component.anno.router.RouterApiAnno interface * {*;}
-keep class **.**RouterApiGenerated {*;}
# 几个用户自定义或者自动生成到其他包下的应该不混淆
-keep class * implements com.xiaojinzi.component.impl.RouterInterceptor{*;}
-keep class * implements com.xiaojinzi.component.support.IBaseLifecycle{*;}
-keep class * implements com.xiaojinzi.component.application.IApplicationLifecycle{*;}
-keep class * implements com.xiaojinzi.component.application.IComponentApplication{*;}
-keep class * implements com.xiaojinzi.component.support.Inject{*;}

0 comments on commit 8bc1666

Please sign in to comment.