@runanywhere/core 0.16.9 → 0.16.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,23 @@ add_library(${PACKAGE_NAME} SHARED
40
40
  ${BRIDGE_SOURCES}
41
41
  )
42
42
 
43
+ # =============================================================================
44
+ # Fix NitroModules prefab path for library modules
45
+ # The prefab config generated by AGP has incorrect paths when building library modules
46
+ # We need to create the NitroModules target BEFORE the autolinking.cmake runs
47
+ # =============================================================================
48
+ if(DEFINED REACT_NATIVE_NITRO_BUILD_DIR)
49
+ # Find NitroModules.so in the app's build directory
50
+ set(NITRO_LIBS_DIR "${REACT_NATIVE_NITRO_BUILD_DIR}/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/${ANDROID_ABI}")
51
+ if(EXISTS "${NITRO_LIBS_DIR}/libNitroModules.so")
52
+ message(STATUS "[RunAnywhereCore] Using NitroModules from app build: ${NITRO_LIBS_DIR}")
53
+ add_library(react-native-nitro-modules::NitroModules SHARED IMPORTED)
54
+ set_target_properties(react-native-nitro-modules::NitroModules PROPERTIES
55
+ IMPORTED_LOCATION "${NITRO_LIBS_DIR}/libNitroModules.so"
56
+ )
57
+ endif()
58
+ endif()
59
+
43
60
  # Add Nitrogen specs (this handles all React Native linking)
44
61
  include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/runanywherecore+autolinking.cmake)
45
62
 
@@ -119,7 +119,9 @@ android {
119
119
  externalNativeBuild {
120
120
  cmake {
121
121
  cppFlags "-frtti -fexceptions -Wall -fstack-protector-all"
122
- arguments "-DANDROID_STL=c++_shared"
122
+ arguments "-DANDROID_STL=c++_shared",
123
+ // Fix NitroModules prefab path - use app's build directory
124
+ "-DREACT_NATIVE_NITRO_BUILD_DIR=${rootProject.buildDir}"
123
125
  abiFilters 'arm64-v8a'
124
126
  }
125
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runanywhere/core",
3
- "version": "0.16.9",
3
+ "version": "0.16.10",
4
4
  "description": "Core SDK for RunAnywhere React Native - includes RACommons bindings, native bridges, and public API",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",