react-native-transformer-text-input 0.1.0-alpha.1 → 0.1.0-alpha.2
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.
|
@@ -8,7 +8,31 @@ set(LIB_ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
|
|
8
8
|
set(LIB_COMMON_DIR ${LIB_ANDROID_DIR}/../cpp)
|
|
9
9
|
set(LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR}/build/generated/source/codegen/jni)
|
|
10
10
|
set(LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR}/react/renderer/components/${LIB_LITERAL})
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
# Resolve path to react-native-worklets.
|
|
13
|
+
set(REACT_NATIVE_WORKLETS_DIR "" CACHE PATH "Path to react-native-worklets root directory")
|
|
14
|
+
|
|
15
|
+
if(NOT DEFINED REACT_NATIVE_WORKLETS_DIR OR "${REACT_NATIVE_WORKLETS_DIR}" STREQUAL "")
|
|
16
|
+
set(NODE_BINARY "node" CACHE STRING "Path to Node.js binary")
|
|
17
|
+
|
|
18
|
+
execute_process(
|
|
19
|
+
COMMAND "${NODE_BINARY}" -p "require.resolve('react-native-worklets/package.json')"
|
|
20
|
+
WORKING_DIRECTORY "${PROJECT_ROOT_DIR}/.."
|
|
21
|
+
OUTPUT_VARIABLE _worklets_pkg_json
|
|
22
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
23
|
+
RESULT_VARIABLE _worklets_res
|
|
24
|
+
ERROR_QUIET
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
if (NOT _worklets_res EQUAL 0)
|
|
28
|
+
message(FATAL_ERROR
|
|
29
|
+
"Failed to resolve 'react-native-worklets' with Node from '${PROJECT_ROOT_DIR}/..'. "
|
|
30
|
+
"Set REACT_NATIVE_WORKLETS_DIR or NODE_BINARY explicitly."
|
|
31
|
+
)
|
|
32
|
+
endif()
|
|
33
|
+
|
|
34
|
+
get_filename_component(REACT_NATIVE_WORKLETS_DIR "${_worklets_pkg_json}" DIRECTORY)
|
|
35
|
+
endif()
|
|
12
36
|
|
|
13
37
|
file(GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR}/*.cpp)
|
|
14
38
|
file(GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_JNI_DIR}/*.cpp ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}/*.cpp)
|
|
@@ -33,8 +57,11 @@ target_include_directories(
|
|
|
33
57
|
"${REACT_NATIVE_WORKLETS_DIR}/android/src/main/cpp"
|
|
34
58
|
)
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
|
|
60
|
+
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
|
|
61
|
+
set(BUILD_TYPE "debug")
|
|
62
|
+
else()
|
|
63
|
+
set(BUILD_TYPE "release")
|
|
64
|
+
endif()
|
|
38
65
|
|
|
39
66
|
add_library(worklets SHARED IMPORTED)
|
|
40
67
|
|
|
@@ -42,7 +69,7 @@ set_target_properties(
|
|
|
42
69
|
worklets
|
|
43
70
|
PROPERTIES
|
|
44
71
|
IMPORTED_LOCATION
|
|
45
|
-
"${REACT_NATIVE_WORKLETS_DIR}/android/build/intermediates/cmake/
|
|
72
|
+
"${REACT_NATIVE_WORKLETS_DIR}/android/build/intermediates/cmake/${BUILD_TYPE}/obj/${ANDROID_ABI}/libworklets.so"
|
|
46
73
|
)
|
|
47
74
|
|
|
48
75
|
target_link_libraries(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-transformer-text-input",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "TextInput component that allows transforming text synchronously with a worklet",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|