Skip to content

Commit

Permalink
fix: 🐛 修复proguard bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg886 committed Nov 8, 2024
1 parent 790cc3a commit 2459fd2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ android {
configurations {
all {
exclude("net.sf.kxml","kxml2")
exclude("xmlpull","xmlpull")
}
}

Expand Down
24 changes: 23 additions & 1 deletion composeApp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
-dontwarn org.slf4j.impl.StaticLoggerBinder

-keep class * implements org.slf4j.ILoggerFactory {
<init>(...);
<methods>;
}

# 保留所有实现了 Screen 的子类及其成员和方法
-keep class * extends cafe.adriel.voyager.core.screen.Screen {
<init>(...);
<methods>;
}
}

-dontwarn org.slf4j.impl.StaticLoggerBinder
# 保留所有实现了 Screen 的子类及其成员和方法
-keep class * extends cafe.adriel.voyager.core.screen.Screen {
<init>(...);
<methods>;
}

-keep class org.xmlpull.v1.XmlPullParser { *; }
-keep class * extends org.xmlpull.v1.XmlPullParser {
<init>(...);
<methods>;
}

-dontwarn org.xmlpull.v1.**
-dontwarn org.xmlpull.mxp1.**
1 change: 1 addition & 0 deletions composeApp/src/commonMain/kotlin/top/kagg886/pmf/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import org.jetbrains.compose.ui.tooling.preview.Preview
import org.koin.core.context.startKoin
import org.koin.dsl.module
import org.koin.java.KoinJavaComponent.inject
import org.xmlpull.v1.XmlPullParser
import top.kagg886.pmf.backend.AppConfig
import top.kagg886.pmf.backend.database.AppDatabase
import top.kagg886.pmf.backend.pixiv.PixivConfig
Expand Down

0 comments on commit 2459fd2

Please sign in to comment.