react-native-worklets 0.8.0-nightly-20251206-3149e1123 → 0.8.0-nightly-20251208-51904bb3d

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.
@@ -1,7 +1,7 @@
1
1
  import com.android.build.gradle.tasks.ExternalNativeBuildJsonTask
2
2
  import groovy.json.JsonSlurper
3
- import java.nio.file.Paths
4
3
  import org.apache.tools.ant.taskdefs.condition.Os
4
+ import javax.inject.Inject
5
5
 
6
6
  def safeExtGet(prop, fallback) {
7
7
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -27,19 +27,15 @@ def resolveReactNativeDirectory() {
27
27
  }
28
28
 
29
29
  // Fallback to node resolver for custom directory structures like monorepos.
30
- def reactNativePackage = file(
31
- providers.exec {
32
- workingDir(rootDir)
33
- commandLine("node", "--print", "require.resolve('react-native/package.json')")
34
- }.standardOutput.asText.get().trim()
35
- )
30
+ def reactNativePackage = file(providers.exec {
31
+ workingDir(rootDir)
32
+ commandLine("node", "--print", "require.resolve('react-native/package.json')")
33
+ }.standardOutput.asText.get().trim())
36
34
  if (reactNativePackage.exists()) {
37
35
  return reactNativePackage.parentFile
38
36
  }
39
37
 
40
- throw new GradleException(
41
- "[Worklets] Unable to resolve react-native location in node_modules. You should set project extension property (in `app/build.gradle`) named `REACT_NATIVE_NODE_MODULES_DIR` with the path to react-native in node_modules."
42
- )
38
+ throw new GradleException("[Worklets] Unable to resolve react-native location in node_modules. You should set project extension property (in `app/build.gradle`) named `REACT_NATIVE_NODE_MODULES_DIR` with the path to react-native in node_modules.")
43
39
  }
44
40
 
45
41
  def getReactNativeVersion() {
@@ -60,7 +56,7 @@ def getWorkletsVersion() {
60
56
  return json.version
61
57
  }
62
58
 
63
- def toPlatformFileString(String path) {
59
+ static def toPlatformFileString(String path) {
64
60
  if (Os.isFamily(Os.FAMILY_WINDOWS)) {
65
61
  path = path.replace(File.separatorChar, '/' as char)
66
62
  }
@@ -74,15 +70,13 @@ def getStaticFeatureFlags() {
74
70
  if (!staticFeatureFlagsFile.exists()) {
75
71
  throw new GradleException("[Worklets] Feature flags file not found at ${staticFeatureFlagsFile.absolutePath}.")
76
72
  }
77
- new JsonSlurper().parseText(staticFeatureFlagsFile.text).each { key, value ->
78
- featureFlags[key] = value.toString()
73
+ new JsonSlurper().parseText(staticFeatureFlagsFile.text).each { key, value -> featureFlags[key] = value.toString()
79
74
  }
80
75
 
81
76
  def packageJsonFile = file(rootDir.path + "/../package.json")
82
77
  if (packageJsonFile.exists()) {
83
78
  def packageJson = new JsonSlurper().parseText(packageJsonFile.text)
84
- packageJson.worklets?.staticFeatureFlags?.each { key, value ->
85
- featureFlags[key] = value.toString()
79
+ packageJson.worklets?.staticFeatureFlags?.each { key, value -> featureFlags[key] = value.toString()
86
80
  }
87
81
  }
88
82
 
@@ -108,7 +102,7 @@ def WORKLETS_PROFILING = safeAppExtGet("enableWorkletsProfiling", false)
108
102
  // Set version for prefab
109
103
  version WORKLETS_VERSION
110
104
 
111
- def workletsPrefabHeadersDir = project.file("$buildDir/prefab-headers/worklets")
105
+ def workletsPrefabHeadersDir = project.file("${getLayout().getBuildDirectory()}/prefab-headers/worklets")
112
106
 
113
107
  def JS_RUNTIME = {
114
108
  // Override JS runtime with environment variable
@@ -137,9 +131,9 @@ buildscript {
137
131
  mavenCentral()
138
132
  }
139
133
  dependencies {
140
- classpath "com.android.tools.build:gradle:8.2.1"
134
+ classpath "com.android.tools.build:gradle:8.13.1"
141
135
  classpath "de.undercouch:gradle-download-task:5.6.0"
142
- classpath "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
136
+ classpath "com.diffplug.spotless:spotless-plugin-gradle:8.1.0"
143
137
  }
144
138
  }
145
139
 
@@ -204,7 +198,7 @@ android {
204
198
  "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
205
199
  "-DWORKLETS_FEATURE_FLAGS=${WORKLETS_FEATURE_FLAGS}",
206
200
  "-DHERMES_V1_ENABLED=${HERMES_V1_ENABLED}"
207
- abiFilters (*reactNativeArchitectures())
201
+ abiFilters(*reactNativeArchitectures())
208
202
  targets("worklets")
209
203
  }
210
204
  }
@@ -245,18 +239,16 @@ android {
245
239
  // while there are more libraries copied in intermediates folder of the lib build directory, we exclude
246
240
  // only the ones that make the build fail (ideally we should only include libreanimated but we
247
241
  // are only allowed to specify exclude patterns)
248
- excludes = [
249
- "META-INF",
250
- "META-INF/**",
251
- "**/libc++_shared.so",
252
- "**/libfbjni.so",
253
- "**/libjsi.so",
254
- "**/libhermes.so",
255
- "**/libhermesvm.so",
256
- "**/libhermestooling.so",
257
- "**/libreactnative.so",
258
- "**/libjscexecutor.so",
259
- ]
242
+ excludes = ["META-INF",
243
+ "META-INF/**",
244
+ "**/libc++_shared.so",
245
+ "**/libfbjni.so",
246
+ "**/libjsi.so",
247
+ "**/libhermes.so",
248
+ "**/libhermesvm.so",
249
+ "**/libhermestooling.so",
250
+ "**/libreactnative.so",
251
+ "**/libjscexecutor.so",]
260
252
  }
261
253
  compileOptions {
262
254
  sourceCompatibility JavaVersion.VERSION_17
@@ -273,8 +265,8 @@ android {
273
265
  }
274
266
  }
275
267
  }
276
- tasks.withType(ExternalNativeBuildJsonTask) {
277
- compileTask ->
268
+ tasks.withType(ExternalNativeBuildJsonTask).tap {
269
+ configureEach { compileTask ->
278
270
  compileTask.doLast {
279
271
  if (!IS_REANIMATED_EXAMPLE_APP) {
280
272
  return
@@ -287,6 +279,7 @@ android {
287
279
 
288
280
  println("Generated clangd metadata.")
289
281
  }
282
+ }
290
283
  }
291
284
  }
292
285
 
@@ -296,7 +289,7 @@ def validateReactNativeVersionResult = providers.exec {
296
289
  ignoreExitValue = true
297
290
  }
298
291
 
299
- task assertMinimalReactNativeVersionTask {
292
+ tasks.register('assertMinimalReactNativeVersionTask') {
300
293
  doFirst {
301
294
  if (validateReactNativeVersionResult.getResult().get().exitValue != 0) {
302
295
  throw new GradleException(validateReactNativeVersionResult.getStandardError().getAsText().get().trim())
@@ -306,7 +299,7 @@ task assertMinimalReactNativeVersionTask {
306
299
 
307
300
  preBuild.dependsOn(assertMinimalReactNativeVersionTask)
308
301
 
309
- task assertNewArchitectureEnabledTask {
302
+ tasks.register('assertNewArchitectureEnabledTask') {
310
303
  onlyIf { !IS_NEW_ARCHITECTURE_ENABLED }
311
304
  doFirst {
312
305
  throw new GradleException("[Worklets] Worklets require new architecture to be enabled. Please enable it by setting `newArchEnabled` to `true` in `gradle.properties`.")
@@ -315,17 +308,25 @@ task assertNewArchitectureEnabledTask {
315
308
 
316
309
  preBuild.dependsOn(assertNewArchitectureEnabledTask)
317
310
 
318
- task prepareWorkletsHeadersForPrefabs(type: Copy) {
311
+ tasks.register('prepareWorkletsHeadersForPrefabs', Copy) {
319
312
  from("$projectDir/src/main/cpp")
320
313
  from("$projectDir/../Common/cpp")
321
314
  include("worklets/**/*.h")
322
315
  into(workletsPrefabHeadersDir)
323
316
  }
324
317
 
325
- task cleanCmakeCache() {
326
- tasks.getByName("clean").dependsOn(cleanCmakeCache)
318
+ interface FSService {
319
+ @Inject
320
+ FileSystemOperations getFs()
321
+ }
322
+
323
+ tasks.register('cleanCMakeCache') {
324
+ def fsProvider = project.objects.newInstance(FSService)
325
+ def cxxDir = file("${projectDir}/.cxx")
327
326
  doFirst {
328
- delete "${projectDir}/.cxx"
327
+ fsProvider.fs.delete {
328
+ delete cxxDir
329
+ }
329
330
  }
330
331
  }
331
332
 
@@ -336,8 +337,8 @@ repositories {
336
337
 
337
338
  dependencies {
338
339
  implementation "com.facebook.yoga:proguard-annotations:1.19.0"
339
- implementation "androidx.transition:transition:1.1.0"
340
- implementation "androidx.core:core:1.6.0"
340
+ implementation "androidx.transition:transition:1.6.0"
341
+ implementation "androidx.core:core:1.17.0"
341
342
 
342
343
  implementation "com.facebook.react:react-android" // version substituted by RNGP
343
344
  if (JS_RUNTIME == "hermes") {
@@ -346,3 +347,10 @@ dependencies {
346
347
  }
347
348
 
348
349
  preBuild.dependsOn(prepareWorkletsHeadersForPrefabs)
350
+
351
+ afterEvaluate {
352
+ tasks.named("clean") {
353
+ it.finalizedBy(cleanCMakeCache)
354
+ }
355
+ }
356
+
@@ -5,5 +5,5 @@
5
5
  * version used to build the native part of the library in runtime. Remember to
6
6
  * keep this in sync with the version declared in `package.json`
7
7
  */
8
- export const jsVersion = '0.8.0-nightly-20251206-3149e1123';
8
+ export const jsVersion = '0.8.0-nightly-20251208-51904bb3d';
9
9
  //# sourceMappingURL=jsVersion.js.map
@@ -3,5 +3,5 @@
3
3
  * version used to build the native part of the library in runtime. Remember to
4
4
  * keep this in sync with the version declared in `package.json`
5
5
  */
6
- export declare const jsVersion = "0.8.0-nightly-20251206-3149e1123";
6
+ export declare const jsVersion = "0.8.0-nightly-20251208-51904bb3d";
7
7
  //# sourceMappingURL=jsVersion.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-worklets",
3
- "version": "0.8.0-nightly-20251206-3149e1123",
3
+ "version": "0.8.0-nightly-20251208-51904bb3d",
4
4
  "description": "The React Native multithreading library",
5
5
  "keywords": [
6
6
  "react-native",
@@ -71,7 +71,7 @@
71
71
  "@babel/cli": "7.28.3",
72
72
  "@babel/core": "7.28.4",
73
73
  "@react-native-community/cli": "20.0.0",
74
- "@react-native/eslint-config": "0.82.0",
74
+ "@react-native/eslint-config": "0.83.0-rc.4",
75
75
  "@types/jest": "30.0.0",
76
76
  "@types/node": "24.7.0",
77
77
  "@types/react": "19.2.2",
@@ -82,8 +82,8 @@
82
82
  "knip": "5.61.3",
83
83
  "madge": "8.0.0",
84
84
  "prettier": "3.6.2",
85
- "react": "19.1.1",
86
- "react-native": "0.82.0",
85
+ "react": "19.2.0",
86
+ "react-native": "0.83.0-rc.4",
87
87
  "react-native-builder-bob": "0.40.13",
88
88
  "typescript": "5.8.3"
89
89
  },
@@ -5,4 +5,4 @@
5
5
  * version used to build the native part of the library in runtime. Remember to
6
6
  * keep this in sync with the version declared in `package.json`
7
7
  */
8
- export const jsVersion = '0.8.0-nightly-20251206-3149e1123';
8
+ export const jsVersion = '0.8.0-nightly-20251208-51904bb3d';