Skip to content

Commit 8bbed7a

Browse files
feat: rn 0.76 support on android
1 parent 2654df8 commit 8bbed7a

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

android/CMakeLists.txt

+22-11
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,25 @@ include_directories(
4242
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/react/turbomodule"
4343
)
4444

45-
target_link_libraries(
46-
react-native-fast-opencv
47-
log
48-
android
49-
ReactAndroid::folly_runtime
50-
ReactAndroid::glog
51-
ReactAndroid::jsi
52-
ReactAndroid::reactnativejni
53-
fbjni::fbjni
54-
OpenCV::opencv_java4
55-
)
45+
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
46+
target_link_libraries(
47+
react-native-fast-opencv
48+
log
49+
android
50+
ReactAndroid::reactnative
51+
fbjni::fbjni
52+
OpenCV::opencv_java4
53+
)
54+
else()
55+
target_link_libraries(
56+
react-native-fast-opencv
57+
log
58+
android
59+
ReactAndroid::folly_runtime
60+
ReactAndroid::glog
61+
ReactAndroid::jsi
62+
ReactAndroid::reactnativejni
63+
fbjni::fbjni
64+
OpenCV::opencv_java4
65+
)
66+
endif()

example/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3434
# your application. You should enable this flag either if you want
3535
# to write custom TurboModules/Fabric components OR use libraries that
3636
# are providing them.
37-
newArchEnabled=true
37+
newArchEnabled=false
3838

3939
# Use this property to enable or disable the Hermes JS engine.
4040
# If set to false, you will be using JSC instead.

example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ PODS:
936936
- React-Mapbuffer (0.74.4):
937937
- glog
938938
- React-debug
939-
- react-native-fast-opencv (0.2.13):
939+
- react-native-fast-opencv (0.3.1):
940940
- DoubleConversion
941941
- FastOpenCV-iOS (= 1.0.4)
942942
- glog
@@ -1594,7 +1594,7 @@ SPEC CHECKSUMS:
15941594
React-jsitracing: 4e9c99e73a6269b27b0d4cbab277dd90df3e5ac0
15951595
React-logger: fbfb50e2a2b1b46ee087f0a52739fadecc5e81a4
15961596
React-Mapbuffer: d39610dff659d8cf1fea485abae08bbf6f9c8279
1597-
react-native-fast-opencv: 42e907a906c94bd081a62de430ce3938865af7e9
1597+
react-native-fast-opencv: 7b63cf65c463b153286f5556ef51b0cad47fb128
15981598
react-native-image-picker: c3afe5472ef870d98a4b28415fc0b928161ee5f7
15991599
react-native-safe-area-context: 851c62c48dce80ccaa5637b6aa5991a1bc36eca9
16001600
react-native-skia: 8da84ea9410504bf27f0db229539a43f6caabb6a

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"source": "./src/index.tsx",
66
"main": "./lib/commonjs/index.js",
77
"module": "./lib/module/index.js",
8+
"types": "./lib/typescript/module/src/index.d.ts",
89
"files": [
910
"src",
1011
"lib",

0 commit comments

Comments
 (0)