Skip to content

Commit

Permalink
Android Release 保留 symbol 名以及 source table
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Nov 6, 2024
1 parent 793ade8 commit 6335f94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/shared/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@

# Android AIDL for torrent service.
-keepnames class me.him188.ani.app.domain.torrent.I* { *; }
-keepnames class me.him188.ani.app.domain.torrent.parcel.** { *; }
-keepnames class me.him188.ani.app.domain.torrent.parcel.** { *; }

-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
-keepnames class me.him188.ani.** { *; }
8 changes: 7 additions & 1 deletion buildSrc/src/main/kotlin/build.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import java.io.File

fun Project.sharedAndroidProguardRules(): Array<File> {
return arrayOf(file(project(":app:shared").projectDir.resolve("proguard-rules.pro")))
val dir = project(":app:shared").projectDir
return listOf(
dir.resolve("proguard-rules.pro"),
dir.resolve("proguard-rules-keep-names.pro"),
).filter {
it.exists()
}.toTypedArray()
}

val testOptInAnnotations = arrayOf(
Expand Down

0 comments on commit 6335f94

Please sign in to comment.