Hi! Thanks for the great library.
We’re seeing an Android test-build failure (Detox / androidTest) with react-native-worklets-core@1.6.2 due to duplicate native libs during merge.
Environment
react-native-worklets-core: 1.6.2
react-native: 0.83.1
- Gradle:
9.0.0 (wrapper)
- Android NDK:
27.1.12297006
- OS: Linux
Repro
In a RN app with Detox enabled, run a debug android test build (for us this is via npm run e2e:debug-build).
Fails at:
:react-native-worklets-core:mergeDebugAndroidTestNativeLibs
Error
Initially:
2 files found with path 'lib/arm64-v8a/libhermestooling.so' from inputs:
- .../node_modules/react-native-worklets-core/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libhermestooling.so
- .../.gradle/caches/.../jetified-react-android-0.83.1-debug/jni/arm64-v8a/libhermestooling.so
After excluding that one, next duplicate is:
2 files found with path 'lib/arm64-v8a/libhermesvm.so' from inputs:
- .../node_modules/react-native-worklets-core/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libhermesvm.so
- .../.gradle/caches/.../jetified-hermes-android-0.14.0-debug/jni/arm64-v8a/libhermesvm.so
Current workaround
In react-native-worklets-core/android/build.gradle under packagingOptions.excludes, adding:
"**/libhermestooling.so",
"**/libhermesvm.so",
fixes the issue for us. After this, both:
:react-native-worklets-core:mergeDebugAndroidTestNativeLibs
- full Detox debug build
succeed.
Request
Would you consider adding these excludes upstream (or otherwise adjusting packaging) so androidTest/Detox builds work out of the box on RN 0.83.x?
Happy to provide more logs or test a PR.
Hi! Thanks for the great library.
We’re seeing an Android test-build failure (Detox /
androidTest) withreact-native-worklets-core@1.6.2due to duplicate native libs during merge.Environment
react-native-worklets-core:1.6.2react-native:0.83.19.0.0(wrapper)27.1.12297006Repro
In a RN app with Detox enabled, run a debug android test build (for us this is via
npm run e2e:debug-build).Fails at:
:react-native-worklets-core:mergeDebugAndroidTestNativeLibsError
Initially:
After excluding that one, next duplicate is:
Current workaround
In
react-native-worklets-core/android/build.gradleunderpackagingOptions.excludes, adding:fixes the issue for us. After this, both:
:react-native-worklets-core:mergeDebugAndroidTestNativeLibssucceed.
Request
Would you consider adding these excludes upstream (or otherwise adjusting packaging) so
androidTest/Detox builds work out of the box on RN 0.83.x?Happy to provide more logs or test a PR.