diff --git a/packages/react-native-reanimated/Common/cpp/worklets/Tools/ReanimatedVersion.cpp b/packages/react-native-reanimated/Common/cpp/worklets/Tools/ReanimatedVersion.cpp index 33dec2f1ed1..0f982afebca 100644 --- a/packages/react-native-reanimated/Common/cpp/worklets/Tools/ReanimatedVersion.cpp +++ b/packages/react-native-reanimated/Common/cpp/worklets/Tools/ReanimatedVersion.cpp @@ -16,7 +16,7 @@ using namespace facebook; namespace worklets { std::string getReanimatedCppVersion() { - return std::string("3.17.0"); + return std::string(REANIMATED_VERSION_STRING); } void injectReanimatedCppVersion(jsi::Runtime &rnRuntime) { diff --git a/packages/react-native-reanimated/RNReanimated.podspec b/packages/react-native-reanimated/RNReanimated.podspec index 343db4cc96b..5fa9d7dfe15 100644 --- a/packages/react-native-reanimated/RNReanimated.podspec +++ b/packages/react-native-reanimated/RNReanimated.podspec @@ -78,9 +78,9 @@ Pod::Spec.new do |s| s.platforms = { :ios => ios_min_version, :tvos => "9.0", :osx => "10.14", :visionos => "1.0" } s.source = { :git => "https://github.com/software-mansion/react-native-reanimated.git", :tag => "#{s.version}" } - # TODO: Uncomment me when dynamic worklets linking is ready if File.directory?(File.join(__dir__, "../react-native-worklets")) - # This condition is really naïve... + # This condition is really naïve, it could potentially + # break if `react-native-worklets` is hoisted`. s.dependency "RNWorklets" else s.subspec "worklets" do |ss| diff --git a/packages/react-native-reanimated/android/build.gradle b/packages/react-native-reanimated/android/build.gradle index 24b0e445cfd..2166f790d4f 100644 --- a/packages/react-native-reanimated/android/build.gradle +++ b/packages/react-native-reanimated/android/build.gradle @@ -147,9 +147,7 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") def reactNativeThirdParty = new File("$reactNativeRootDir/ReactAndroid/src/main/jni/third-party") def reactNativeAndroidDownloadDir = new File("$reactNativeRootDir/ReactAndroid/build/downloads") -// TODO: Uncomment me when when dynamic worklets linking is ready def hasExternalWorklets = rootProject.subprojects.find { it.name == 'react-native-worklets' } != null -// def hasExternalWorklets = false def workletsPrefabHeadersDir = project.file("$buildDir/prefab-headers/worklets") def reanimatedPrefabHeadersDir = project.file("$buildDir/prefab-headers/reanimated") diff --git a/packages/react-native-worklets/.gitignore b/packages/react-native-worklets/.gitignore index 2cacd8a90bf..f48d49ba466 100644 --- a/packages/react-native-worklets/.gitignore +++ b/packages/react-native-worklets/.gitignore @@ -61,7 +61,7 @@ lib/ apple/generated android/generated -# Duplicate worklets code +# Duplicated worklets code apple/duplicated android/src/duplicated Common/duplicated diff --git a/packages/react-native-worklets/RNWorklets.podspec b/packages/react-native-worklets/RNWorklets.podspec index d03cf985865..a694a336a02 100644 --- a/packages/react-native-worklets/RNWorklets.podspec +++ b/packages/react-native-worklets/RNWorklets.podspec @@ -36,9 +36,6 @@ Pod::Spec.new do |s| ss.header_mappings_dir = "Common/duplicated/cpp/worklets" ss.subspec "apple" do |sss| - # Please be careful with the snakes. - # 🐍🐍🐍 - # Thank you for your understanding. sss.source_files = "apple/duplicated/worklets/**/*.{mm,h,m}" sss.header_dir = "worklets" sss.header_mappings_dir = "apple/duplicated/worklets" diff --git a/packages/react-native-worklets/android/CMakeLists.txt b/packages/react-native-worklets/android/CMakeLists.txt index 03a22f93649..4afdff58ffe 100644 --- a/packages/react-native-worklets/android/CMakeLists.txt +++ b/packages/react-native-worklets/android/CMakeLists.txt @@ -55,5 +55,4 @@ set(COMMON_CPP_DIR "${CMAKE_SOURCE_DIR}/../Common/cpp") set(DUPLICATED_ANDROID_CPP_DIR "${CMAKE_SOURCE_DIR}/src/duplicated/main/cpp") set(DUPLICATED_COMMON_CPP_DIR "${CMAKE_SOURCE_DIR}/../Common/duplicated/cpp") -# TODO: Uncomment me when worklets get some sources add_subdirectory("${ANDROID_CPP_DIR}/worklets") diff --git a/packages/react-native-worklets/package.json b/packages/react-native-worklets/package.json index 50df16a5025..6c105714961 100644 --- a/packages/react-native-worklets/package.json +++ b/packages/react-native-worklets/package.json @@ -1,7 +1,7 @@ { "name": "react-native-worklets", "version": "0.0.1", - "description": "🚀", + "description": "The React Native multithreading library", "scripts": { "build": "./scripts/replicate-worklets-code.sh && bob build", "format": "yarn format:js", diff --git a/packages/react-native-worklets/scripts/replicate-worklets-code.sh b/packages/react-native-worklets/scripts/duplicate-worklets-code.sh similarity index 100% rename from packages/react-native-worklets/scripts/replicate-worklets-code.sh rename to packages/react-native-worklets/scripts/duplicate-worklets-code.sh