Skip to content

Commit 12cce61

Browse files
authored
chore(repack): use the packaging DSL in the Android library
Replace the deprecated packagingOptions block with packaging, splitting the native library and resource excludes and using keepDebugSymbols for debug builds. The produced AARs are unchanged.
1 parent 3cacf4a commit 12cce61

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

‎packages/repack/android/build.gradle‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,22 @@ android {
8787
}
8888
}
8989

90-
packagingOptions {
91-
doNotStrip resolveBuildType() == 'debug' ? "**/**/*.so" : ''
92-
excludes = [
93-
"META-INF",
94-
"META-INF/**",
95-
"**/libjsi.so",
96-
"**/libc++_shared.so",
97-
"**/libfbjni.so",
98-
"**/libreactnative.so",
99-
"**/libhermestooling.so",
100-
]
90+
packaging {
91+
jniLibs {
92+
if (resolveBuildType() == 'debug') {
93+
keepDebugSymbols += "**/**/*.so"
94+
}
95+
excludes += [
96+
"**/libjsi.so",
97+
"**/libc++_shared.so",
98+
"**/libfbjni.so",
99+
"**/libreactnative.so",
100+
"**/libhermestooling.so",
101+
]
102+
}
103+
resources {
104+
excludes += ["META-INF", "META-INF/**"]
105+
}
101106
}
102107

103108
sourceSets.main {

0 commit comments

Comments
 (0)