Skip to content

Commit fa85417

Browse files
cortinicofacebook-github-bot
authored andcommitted
Do not bundle libhermes.so or libjsc.so inside the React Native Android AAR (#33038)
Summary: Pull Request resolved: #33038 While rolling out RN 0.68.x we noticed that `libhermes.so` and `libjsc.so` were included inside the final .aar we publish to NPM. This forced users (on both old or new arch) to specify a `pickFirst` directive inside their packaging option (which is unpractical and risky as the two .so might not be compatible each other if they're coming from different Hermes/JSC versions). Changelog: [Android] [Fixed] - Do not bundle libhermes.so or libjsc.so inside the React Native Android AAR Reviewed By: ShikaSD Differential Revision: D33979107 fbshipit-source-id: 0b71d59f210b8bc9903cd0f30ed6e2120aab99e0
1 parent 4cbcb7a commit fa85417

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ReactAndroid/build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ android {
351351
packagingOptions {
352352
exclude("META-INF/NOTICE")
353353
exclude("META-INF/LICENSE")
354+
// We intentionally don't want to bundle any JS Runtime inside the Android AAR
355+
// we produce. The reason behind this is that we want to allow users to pick the
356+
// JS engine by specifying a dependency on either `hermes-engine` or `android-jsc`
357+
// that will include the necessary .so files to load.
358+
exclude("**/libhermes.so")
359+
exclude("**/libjsc.so")
354360
}
355361

356362
configurations {

template/android/app/build.gradle

-5
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,6 @@ android {
233233

234234
}
235235
}
236-
237-
packagingOptions {
238-
pickFirst '**/libhermes.so'
239-
pickFirst '**/libjsc.so'
240-
}
241236
}
242237

243238
dependencies {

0 commit comments

Comments
 (0)