react-native 0.71.0-rc.2 → 0.71.0-rc.3

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.
Files changed (46) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/React/Base/RCTVersion.m +1 -1
  3. package/React/CxxBridge/JSCExecutorFactory.mm +1 -1
  4. package/ReactAndroid/build.gradle +55 -21
  5. package/ReactAndroid/gradle.properties +1 -1
  6. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/BUCK +1 -0
  7. package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java +5 -4
  8. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  9. package/ReactAndroid/src/main/jni/CMakeLists.txt +1 -0
  10. package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/BUCK +1 -1
  11. package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +5 -14
  12. package/ReactAndroid/src/main/jni/react/jscexecutor/BUCK +1 -1
  13. package/ReactAndroid/src/main/jni/react/jscexecutor/OnLoad.cpp +1 -1
  14. package/ReactCommon/React-Fabric.podspec +0 -2
  15. package/ReactCommon/ReactCommon.podspec +1 -1
  16. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  17. package/ReactCommon/hermes/React-hermes.podspec +0 -1
  18. package/ReactCommon/hermes/executor/CMakeLists.txt +6 -5
  19. package/ReactCommon/hermes/inspector/CMakeLists.txt +4 -4
  20. package/ReactCommon/jsc/.clang-tidy +6 -0
  21. package/ReactCommon/jsc/BUCK +34 -0
  22. package/ReactCommon/jsc/CMakeLists.txt +35 -0
  23. package/ReactCommon/{jsi → jsc}/JSCRuntime.cpp +0 -0
  24. package/ReactCommon/{jsi → jsc}/JSCRuntime.h +0 -0
  25. package/ReactCommon/{jsi → jsc}/React-jsc.podspec +1 -5
  26. package/ReactCommon/jsi/BUCK +1 -31
  27. package/ReactCommon/jsi/CMakeLists.txt +0 -16
  28. package/ReactCommon/jsi/React-jsi.podspec +16 -3
  29. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +0 -1
  30. package/ReactCommon/react/bridging/CallbackWrapper.h +1 -1
  31. package/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h +11 -0
  32. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +1 -2
  33. package/android/README.md +21 -0
  34. package/jest/react-native-env.js +3 -1
  35. package/package.json +2 -2
  36. package/react.gradle +2 -2
  37. package/scripts/cocoapods/jsengine.rb +2 -2
  38. package/scripts/react_native_pods.rb +1 -1
  39. package/scripts/react_native_pods_utils/script_phases.sh +10 -12
  40. package/sdks/.hermesversion +1 -1
  41. package/sdks/hermesc/osx-bin/hermesc +0 -0
  42. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  43. package/template/android/build.gradle +1 -1
  44. package/template/ios/Podfile +6 -0
  45. package/template/package.json +1 -1
  46. package/ReactCommon/jsi/React-jsidynamic.podspec +0 -42
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 71,
15
15
  patch: 0,
16
- prerelease: 'rc.2',
16
+ prerelease: 'rc.3',
17
17
  };
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(71),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.2",
27
+ RCTVersionPrerelease: @"rc.3",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -7,7 +7,7 @@
7
7
 
8
8
  #include "JSCExecutorFactory.h"
9
9
 
10
- #import <jsi/JSCRuntime.h>
10
+ #import <jsc/JSCRuntime.h>
11
11
 
12
12
  #import <memory>
13
13
 
@@ -144,6 +144,7 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
144
144
  new Pair(new File(buildDir, "third-party-ndk/boost/boost_1_76_0/").absolutePath, ""),
145
145
  new Pair(new File(buildDir, "third-party-ndk/double-conversion/").absolutePath, ""),
146
146
  new Pair(new File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
147
+ new Pair(new File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
147
148
  new Pair("../ReactCommon/butter/", "butter/"),
148
149
  new Pair("../ReactCommon/callinvoker/", ""),
149
150
  new Pair("../ReactCommon/react/bridging/", "react/bridging/"),
@@ -152,6 +153,8 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
152
153
  new Pair("../ReactCommon/react/nativemodule/core/platform/android/", ""),
153
154
  new Pair("../ReactCommon/react/renderer/componentregistry/", "react/renderer/componentregistry/"),
154
155
  new Pair("../ReactCommon/react/renderer/components/root/", "react/renderer/components/root/"),
156
+ new Pair("../ReactCommon/react/renderer/core/", "react/renderer/core/"),
157
+ new Pair("../ReactCommon/react/renderer/debug/", "react/renderer/debug/"),
155
158
  new Pair("../ReactCommon/react/renderer/leakchecker/", "react/renderer/leakchecker/"),
156
159
  new Pair("../ReactCommon/react/renderer/mapbuffer/", "react/renderer/mapbuffer/"),
157
160
  new Pair("../ReactCommon/react/renderer/mounting/", "react/renderer/mounting/"),
@@ -159,6 +162,7 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
159
162
  new Pair("../ReactCommon/react/renderer/scheduler/", "react/renderer/scheduler/"),
160
163
  new Pair("../ReactCommon/react/renderer/telemetry/", "react/renderer/telemetry/"),
161
164
  new Pair("../ReactCommon/react/renderer/uimanager/", "react/renderer/uimanager/"),
165
+ new Pair("../ReactCommon/react/debug/", "react/debug/"),
162
166
  new Pair("../ReactCommon/react/utils/", "react/utils/"),
163
167
  new Pair("src/main/jni/react/jni", "react/jni/"),
164
168
  ]
@@ -174,6 +178,35 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
174
178
  "rrc_image",
175
179
  new Pair("../ReactCommon/react/renderer/components/image/", "react/renderer/components/image/")
176
180
  ),
181
+ // These prefab targets are used by Expo & Reanimated
182
+ new PrefabPreprocessingEntry(
183
+ "hermes_executor",
184
+ // "hermes_executor" is statically linking against "hermes_executor_common"
185
+ // and "hermes_inspector". Here we expose only the headers that we know are needed.
186
+ new Pair("../ReactCommon/hermes/inspector/", "hermes/inspector/")
187
+ ),
188
+ new PrefabPreprocessingEntry(
189
+ "jscexecutor",
190
+ // "jscexecutor" is statically linking against "jscruntime"
191
+ // Here we expose only the headers that we know are needed.
192
+ new Pair("../ReactCommon/jsc/", "jsc/")
193
+ ),
194
+ new PrefabPreprocessingEntry(
195
+ "react_render_uimanager",
196
+ new Pair("../ReactCommon/react/renderer/uimanager/", "react/renderer/uimanager/"),
197
+ ),
198
+ new PrefabPreprocessingEntry(
199
+ "react_render_scheduler",
200
+ new Pair("../ReactCommon/react/renderer/scheduler/", "react/renderer/scheduler/"),
201
+ ),
202
+ new PrefabPreprocessingEntry(
203
+ "react_render_mounting",
204
+ new Pair("../ReactCommon/react/renderer/mounting/", "react/renderer/mounting/"),
205
+ ),
206
+ new PrefabPreprocessingEntry(
207
+ "reactnativejni",
208
+ new Pair("src/main/jni/react/jni", "react/jni/"),
209
+ ),
177
210
  ]
178
211
  )
179
212
  it.outputDir.set(prefabHeadersDir)
@@ -402,12 +435,12 @@ android {
402
435
  "-DANDROID_TOOLCHAIN=clang",
403
436
  "-DANDROID_PLATFORM=android-21"
404
437
 
405
- targets "reactnativejni",
406
- "jscexecutor",
438
+ targets "jscexecutor",
407
439
  "jsijniprofiler",
408
440
  "reactnativeblob",
409
441
  "reactperfloggerjni",
410
442
  // prefab targets
443
+ "reactnativejni",
411
444
  "react_render_debug",
412
445
  "turbomodulejsijni",
413
446
  "runtimeexecutor",
@@ -426,7 +459,11 @@ android {
426
459
  "yoga",
427
460
  "folly_runtime",
428
461
  "react_nativemodule_core",
429
- "react_render_imagemanager"
462
+ "react_render_imagemanager",
463
+ "react_render_uimanager",
464
+ "react_render_scheduler",
465
+ "react_render_mounting",
466
+ "hermes_executor"
430
467
  }
431
468
  }
432
469
  ndk {
@@ -434,24 +471,6 @@ android {
434
471
  }
435
472
  }
436
473
 
437
- buildTypes {
438
- debug {
439
- externalNativeBuild {
440
- cmake {
441
- targets "hermes-executor-debug"
442
- }
443
- }
444
- }
445
-
446
- release {
447
- externalNativeBuild {
448
- cmake {
449
- targets "hermes-executor-release"
450
- }
451
- }
452
- }
453
- }
454
-
455
474
  externalNativeBuild {
456
475
  cmake {
457
476
  path "src/main/jni/CMakeLists.txt"
@@ -549,6 +568,21 @@ android {
549
568
  react_render_imagemanager {
550
569
  headers(new File(prefabHeadersDir, "react_render_imagemanager").absolutePath)
551
570
  }
571
+ react_render_uimanager {
572
+ headers(new File(prefabHeadersDir, "react_render_uimanager").absolutePath)
573
+ }
574
+ react_render_scheduler {
575
+ headers(new File(prefabHeadersDir, "react_render_scheduler").absolutePath)
576
+ }
577
+ react_render_mounting {
578
+ headers(new File(prefabHeadersDir, "react_render_mounting").absolutePath)
579
+ }
580
+ reactnativejni {
581
+ headers(new File(prefabHeadersDir, "reactnativejni").absolutePath)
582
+ }
583
+ hermes_executor {
584
+ headers(new File(prefabHeadersDir, "hermes_executor").absolutePath)
585
+ }
552
586
  }
553
587
 
554
588
  publishing {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.71.0-rc.2
1
+ VERSION_NAME=0.71.0-rc.3
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  # JVM Versions
@@ -17,6 +17,7 @@ rn_android_library(
17
17
  react_native_target("java/com/facebook/hermes/instrumentation:instrumentation"),
18
18
  react_native_target("java/com/facebook/hermes/instrumentation:hermes_samplingprofiler"),
19
19
  react_native_target("java/com/facebook/react/bridge:bridge"),
20
+ react_native_target("java/com/facebook/react/common:common"),
20
21
  react_native_target("jni/react/hermes/reactexecutor:jni"),
21
22
  ":runtimeconfig",
22
23
  ],
@@ -9,6 +9,7 @@ package com.facebook.hermes.reactexecutor;
9
9
 
10
10
  import com.facebook.jni.HybridData;
11
11
  import com.facebook.react.bridge.JavaScriptExecutor;
12
+ import com.facebook.react.common.build.ReactBuildConfig;
12
13
  import com.facebook.soloader.SoLoader;
13
14
  import javax.annotation.Nullable;
14
15
 
@@ -23,11 +24,11 @@ public class HermesExecutor extends JavaScriptExecutor {
23
24
  if (mode_ == null) {
24
25
  // libhermes must be loaded explicitly to invoke its JNI_OnLoad.
25
26
  SoLoader.loadLibrary("hermes");
26
- try {
27
- SoLoader.loadLibrary("hermes-executor-debug");
27
+ SoLoader.loadLibrary("hermes_executor");
28
+ // libhermes_executor is built differently for Debug & Release so we load the proper mode.
29
+ if (ReactBuildConfig.DEBUG == true) {
28
30
  mode_ = "Debug";
29
- } catch (UnsatisfiedLinkError e) {
30
- SoLoader.loadLibrary("hermes-executor-release");
31
+ } else {
31
32
  mode_ = "Release";
32
33
  }
33
34
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 71,
20
20
  "patch", 0,
21
- "prerelease", "rc.2");
21
+ "prerelease", "rc.3");
22
22
  }
@@ -56,6 +56,7 @@ add_react_common_subdir(reactperflogger)
56
56
  add_react_common_subdir(logger)
57
57
  add_react_common_subdir(jsiexecutor)
58
58
  add_react_common_subdir(cxxreact)
59
+ add_react_common_subdir(jsc)
59
60
  add_react_common_subdir(jsi)
60
61
  add_react_common_subdir(butter)
61
62
  add_react_common_subdir(callinvoker)
@@ -14,6 +14,6 @@ rn_xplat_cxx_library(
14
14
  headers = [],
15
15
  header_namespace = "",
16
16
  compiler_flags = ["-fexceptions"],
17
- soname = "libhermes-executor.$(ext)",
17
+ soname = "libhermes_executor.$(ext)",
18
18
  visibility = ["PUBLIC"],
19
19
  )
@@ -8,29 +8,20 @@ set(CMAKE_VERBOSE_MAKEFILE on)
8
8
 
9
9
  file(GLOB_RECURSE hermes_executor_SRC CONFIGURE_DEPENDS *.cpp)
10
10
 
11
- if(${CMAKE_BUILD_TYPE} MATCHES Debug)
12
- set(HERMES_TARGET_SUFFIX debug)
13
- else()
14
- set(HERMES_TARGET_SUFFIX release)
15
- endif()
16
-
17
- set(HERMES_TARGET_NAME hermes-executor-${HERMES_TARGET_SUFFIX})
18
-
19
- add_library(
20
- ${HERMES_TARGET_NAME}
11
+ add_library(hermes_executor
21
12
  SHARED
22
13
  ${hermes_executor_SRC}
23
14
  )
24
15
  target_compile_options(
25
- ${HERMES_TARGET_NAME}
16
+ hermes_executor
26
17
  PRIVATE
27
18
  $<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
28
19
  -fexceptions
29
20
  )
30
- target_include_directories(${HERMES_TARGET_NAME} PRIVATE .)
21
+ target_include_directories(hermes_executor PRIVATE .)
31
22
  target_link_libraries(
32
- ${HERMES_TARGET_NAME}
33
- hermes-executor-common
23
+ hermes_executor
24
+ hermes_executor_common
34
25
  jsireact
35
26
  fb
36
27
  fbjni
@@ -16,7 +16,7 @@ rn_xplat_cxx_library(
16
16
  deps = [
17
17
  FBJNI_TARGET,
18
18
  react_native_target("jni/react/jni:jni"),
19
- react_native_xplat_target("jsi:JSCRuntime"),
19
+ react_native_xplat_target("jsc:JSCRuntime"),
20
20
  react_native_xplat_target("jsiexecutor:jsiexecutor"),
21
21
  ],
22
22
  )
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  #include <fbjni/fbjni.h>
9
- #include <jsi/JSCRuntime.h>
9
+ #include <jsc/JSCRuntime.h>
10
10
  #include <jsireact/JSIExecutor.h>
11
11
  #include <react/jni/JReactMarker.h>
12
12
  #include <react/jni/JSLogging.h>
@@ -78,7 +78,6 @@ Pod::Spec.new do |s|
78
78
 
79
79
  s.subspec "core" do |ss|
80
80
  ss.dependency folly_dep_name, folly_version
81
- ss.dependency "React-jsidynamic", version
82
81
  ss.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
83
82
  ss.source_files = "react/renderer/core/**/*.{m,mm,cpp,h}"
84
83
  ss.exclude_files = "react/renderer/core/tests"
@@ -303,7 +302,6 @@ Pod::Spec.new do |s|
303
302
 
304
303
  s.subspec "uimanager" do |ss|
305
304
  ss.dependency folly_dep_name, folly_version
306
- ss.dependency "React-jsidynamic", version
307
305
  ss.compiler_flags = folly_compiler_flags
308
306
  ss.source_files = "react/renderer/uimanager/**/*.{m,mm,cpp,h}"
309
307
  ss.exclude_files = "react/renderer/uimanager/tests"
@@ -61,7 +61,7 @@ Pod::Spec.new do |s|
61
61
  ss.subspec "core" do |sss|
62
62
  sss.source_files = "react/nativemodule/core/ReactCommon/**/*.{cpp,h}",
63
63
  "react/nativemodule/core/platform/ios/**/*.{mm,cpp,h}"
64
- sss.dependency "React-jsidynamic", version
64
+ sss.exclude_files = "react/nativemodule/core/ReactCommon/{LongLivedObject,CallbackWrapper}.h"
65
65
  end
66
66
 
67
67
  s.subspec "react_debug_core" do |sss|
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 71;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.2";
21
+ std::string_view Prerelease = "rc.3";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -44,7 +44,6 @@ Pod::Spec.new do |s|
44
44
  }.merge!(build_type == :debug ? { "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" } : {})
45
45
  s.header_dir = "reacthermes"
46
46
  s.dependency "React-cxxreact", version
47
- s.dependency "React-jsidynamic", version
48
47
  s.dependency "React-jsiexecutor", version
49
48
  s.dependency "React-jsinspector", version
50
49
  s.dependency "React-perflogger", version
@@ -8,21 +8,22 @@ set(CMAKE_VERBOSE_MAKEFILE on)
8
8
 
9
9
  file(GLOB_RECURSE hermes_executor_SRC CONFIGURE_DEPENDS *.cpp)
10
10
  add_library(
11
- hermes-executor-common
11
+ hermes_executor_common
12
12
  STATIC
13
13
  ${hermes_executor_SRC}
14
14
  )
15
- target_include_directories(hermes-executor-common PUBLIC .)
16
- target_link_libraries(hermes-executor-common
15
+ target_include_directories(hermes_executor_common PUBLIC .)
16
+ target_link_libraries(hermes_executor_common
17
17
  jsireact
18
18
  hermes-engine::libhermes
19
19
  jsi
20
- debug hermes-inspector
20
+ debug
21
+ hermes_inspector
21
22
  )
22
23
 
23
24
  if(${CMAKE_BUILD_TYPE} MATCHES Debug)
24
25
  target_compile_options(
25
- hermes-executor-common
26
+ hermes_executor_common
26
27
  PRIVATE
27
28
  -DHERMES_ENABLE_DEBUGGER=1
28
29
  )
@@ -8,20 +8,20 @@ set(CMAKE_VERBOSE_MAKEFILE on)
8
8
 
9
9
  file(GLOB hermesinspector_SRC CONFIGURE_DEPENDS *.cpp detail/*.cpp chrome/*.cpp)
10
10
 
11
- add_library(hermes-inspector
11
+ add_library(hermes_inspector
12
12
  STATIC
13
13
  ${hermesinspector_SRC})
14
14
 
15
15
  target_compile_options(
16
- hermes-inspector
16
+ hermes_inspector
17
17
  PRIVATE
18
18
  -DHERMES_ENABLE_DEBUGGER=1
19
19
  -DHERMES_INSPECTOR_FOLLY_KLUDGE=1
20
20
  -fexceptions
21
21
  )
22
22
 
23
- target_include_directories(hermes-inspector PUBLIC ${REACT_COMMON_DIR})
24
- target_link_libraries(hermes-inspector
23
+ target_include_directories(hermes_inspector PUBLIC ${REACT_COMMON_DIR})
24
+ target_link_libraries(hermes_inspector
25
25
  jsinspector
26
26
  fb
27
27
  fbjni
@@ -0,0 +1,6 @@
1
+ ---
2
+ Checks: '>
3
+ clang-diagnostic-*,
4
+ '
5
+ InheritParentConfig: true
6
+ ...
@@ -0,0 +1,34 @@
1
+ load("//tools/build_defs/oss:rn_defs.bzl", "APPLE", "IOS", "MACOSX", "get_apple_compiler_flags", "get_apple_inspector_flags", "get_preprocessor_flags_for_build_mode", "react_native_xplat_dep", "rn_xplat_cxx_library")
2
+
3
+ APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
4
+
5
+ rn_xplat_cxx_library(
6
+ name = "JSCRuntime",
7
+ srcs = [
8
+ "JSCRuntime.cpp",
9
+ ],
10
+ header_namespace = "jsc",
11
+ exported_headers = [
12
+ "JSCRuntime.h",
13
+ ],
14
+ apple_sdks = (IOS, MACOSX),
15
+ compiler_flags_pedantic = True,
16
+ fbobjc_compiler_flags = APPLE_COMPILER_FLAGS + [
17
+ "-Os",
18
+ ],
19
+ fbobjc_frameworks = [
20
+ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
21
+ ],
22
+ fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
23
+ labels = [
24
+ "pfh:ReactNative_CommonInfrastructurePlaceholder",
25
+ ],
26
+ platforms = APPLE,
27
+ visibility = ["PUBLIC"],
28
+ xplat_mangled_args = {
29
+ "soname": "libjscjsi.$(ext)",
30
+ },
31
+ exported_deps = [
32
+ react_native_xplat_dep("jsi:jsi"),
33
+ ],
34
+ )
@@ -0,0 +1,35 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ ##################
7
+ ### jscruntime ###
8
+ ##################
9
+
10
+ cmake_minimum_required(VERSION 3.13)
11
+ set(CMAKE_VERBOSE_MAKEFILE on)
12
+
13
+ add_compile_options(
14
+ -fexceptions
15
+ -frtti
16
+ -O3
17
+ -Wno-unused-lambda-capture
18
+ -DLOG_TAG=\"ReactNative\")
19
+
20
+ add_library(jscruntime
21
+ STATIC
22
+ JSCRuntime.h
23
+ JSCRuntime.cpp)
24
+
25
+ target_include_directories(jscruntime PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
26
+
27
+ target_link_libraries(jscruntime
28
+ folly_runtime
29
+ jsc
30
+ jsi
31
+ glog)
32
+
33
+ # TODO: Remove this flag when ready.
34
+ # Android has this enabled by default, but the flag is still needed for iOS.
35
+ target_compile_options(jscruntime PRIVATE -DRN_FABRIC_ENABLED)
File without changes
File without changes
@@ -28,12 +28,8 @@ Pod::Spec.new do |s|
28
28
  s.source_files = "JSCRuntime.{cpp,h}"
29
29
  s.exclude_files = "**/test/*"
30
30
  s.framework = "JavaScriptCore"
31
- s.dependency "React-jsi", version
32
- s.default_subspec = "Default"
33
31
 
34
- s.subspec "Default" do
35
- # no-op
36
- end
32
+ s.dependency "React-jsi", version
37
33
 
38
34
  s.subspec "Fabric" do |ss|
39
35
  ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" }
@@ -1,4 +1,4 @@
1
- load("//tools/build_defs/oss:rn_defs.bzl", "APPLE", "IOS", "MACOSX", "react_native_xplat_dep", "rn_xplat_cxx_library")
1
+ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_dep", "rn_xplat_cxx_library")
2
2
 
3
3
  rn_xplat_cxx_library(
4
4
  name = "jsi",
@@ -56,33 +56,3 @@ rn_xplat_cxx_library(
56
56
  react_native_xplat_dep("jsi:jsi"),
57
57
  ],
58
58
  )
59
-
60
- rn_xplat_cxx_library(
61
- name = "JSCRuntime",
62
- srcs = [
63
- "JSCRuntime.cpp",
64
- ],
65
- header_namespace = "jsi",
66
- exported_headers = [
67
- "JSCRuntime.h",
68
- ],
69
- apple_sdks = (IOS, MACOSX),
70
- compiler_flags_pedantic = True,
71
- fbobjc_compiler_flags = [
72
- "-Os",
73
- ],
74
- fbobjc_frameworks = [
75
- "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
76
- ],
77
- labels = [
78
- "pfh:ReactNative_CommonInfrastructurePlaceholder",
79
- ],
80
- platforms = APPLE,
81
- visibility = ["PUBLIC"],
82
- xplat_mangled_args = {
83
- "soname": "libjscjsi.$(ext)",
84
- },
85
- exported_deps = [
86
- react_native_xplat_dep("jsi:jsi"),
87
- ],
88
- )
@@ -25,19 +25,3 @@ target_include_directories(jsi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
25
25
  target_link_libraries(jsi
26
26
  folly_runtime
27
27
  glog)
28
-
29
- ##################
30
- ### jscruntime ###
31
- ##################
32
-
33
- add_library(jscruntime STATIC
34
- JSCRuntime.h
35
- JSCRuntime.cpp)
36
-
37
- target_include_directories(jscruntime PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
38
-
39
- target_link_libraries(jscruntime folly_runtime jsc glog)
40
-
41
- # TODO: Remove this flag when ready.
42
- # Android has this enabled by default, but the flag is still needed for iOS.
43
- target_compile_options(jscruntime PRIVATE -DRN_FABRIC_ENABLED)
@@ -20,6 +20,10 @@ else
20
20
  source[:tag] = "v#{version}"
21
21
  end
22
22
 
23
+ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
24
+ folly_version = '2021.07.22.00'
25
+ boost_compiler_flags = '-Wno-documentation'
26
+
23
27
  Pod::Spec.new do |s|
24
28
  s.name = "React-jsi"
25
29
  s.version = version
@@ -30,18 +34,27 @@ Pod::Spec.new do |s|
30
34
  s.platforms = { :ios => "12.4" }
31
35
  s.source = source
32
36
 
37
+ s.header_dir = "jsi"
38
+ s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
39
+ s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
40
+
41
+ s.dependency "boost", "1.76.0"
42
+ s.dependency "DoubleConversion"
43
+ s.dependency "RCT-Folly", folly_version
44
+ s.dependency "glog"
45
+
33
46
  if js_engine == :jsc
34
47
  s.source_files = "**/*.{cpp,h}"
35
48
  s.exclude_files = [
36
- "jsi/JSIDynamic.{h,cpp}",
37
49
  "jsi/jsilib-posix.cpp",
38
50
  "jsi/jsilib-windows.cpp",
39
51
  "**/test/*"
40
52
  ]
41
- s.header_dir = "jsi"
53
+
42
54
  elsif js_engine == :hermes
43
55
  # JSI is provided by hermes-engine when Hermes is enabled
44
- s.source_files = ""
56
+ # Just need to provide JSIDynamic in this case.
57
+ s.source_files = "jsi/JSIDynamic.{cpp,h}"
45
58
  s.dependency "hermes-engine"
46
59
  end
47
60
  end
@@ -36,7 +36,6 @@ Pod::Spec.new do |s|
36
36
 
37
37
  s.dependency "React-cxxreact", version
38
38
  s.dependency "React-jsi", version
39
- s.dependency "React-jsidynamic", version
40
39
  s.dependency "React-perflogger", version
41
40
  s.dependency "RCT-Folly", folly_version
42
41
  s.dependency "DoubleConversion"
@@ -8,7 +8,7 @@
8
8
  #pragma once
9
9
 
10
10
  #include <jsi/jsi.h>
11
- #include <react/bridging/LongLivedObject.h>
11
+ #include "LongLivedObject.h"
12
12
 
13
13
  #include <memory>
14
14
 
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #pragma once
9
+
10
+ // This header is left here for compatibility reasons.
11
+ #include <react/bridging/CallbackWrapper.h>
@@ -13,8 +13,7 @@
13
13
  #include <jsi/jsi.h>
14
14
 
15
15
  #include <ReactCommon/CallInvoker.h>
16
- #include <react/bridging/CallbackWrapper.h>
17
- #include <react/bridging/LongLivedObject.h>
16
+ #include <ReactCommon/CallbackWrapper.h>
18
17
 
19
18
  namespace facebook {
20
19
  namespace react {
@@ -0,0 +1,21 @@
1
+ # The `/android` folder inside `react-native`
2
+
3
+ Starting from React Native 0.71, we're not shipping the `/android` folder inside the React Native NPM package
4
+ anymore due to sizing constraints on NPM. The Android artifacts are distributed via Maven Central.
5
+ You can read more about it in this RFC:
6
+ https://github.com/react-native-community/discussions-and-proposals/pull/508
7
+
8
+ If you're a library author and you're manipulating the React Native .aar files, to extract headers,
9
+ extract `.so` files or do anything with it, you're probably doing something wrong. React Native
10
+ 0.71 ships with all the necessary logic to let you consume it transparently by just using:
11
+
12
+ ```
13
+ implementation("com.facebook.react:react-android")
14
+ // or to keep backward compatibility with older versions of React Native:
15
+ implementation("com.facebook.react:react-native:+")
16
+ ```
17
+
18
+ You should consider refactoring your library code not to unzip/manipulate the React Native .aar files.
19
+
20
+ This README.md file is kept in this folder as some libraries are checking the existence of the `/android` folder
21
+ and failing user builds if the folder is missing.
@@ -12,5 +12,7 @@
12
12
  const NodeEnv = require('jest-environment-node').TestEnvironment;
13
13
 
14
14
  module.exports = class ReactNativeEnv extends NodeEnv {
15
- // this is where we'll add our custom logic
15
+ exportConditions() {
16
+ return ['react-native'];
17
+ }
16
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.71.0-rc.2",
3
+ "version": "0.71.0-rc.3",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -127,7 +127,7 @@
127
127
  "pretty-format": "^26.5.2",
128
128
  "promise": "^8.3.0",
129
129
  "react-devtools-core": "^4.26.1",
130
- "react-native-gradle-plugin": "^0.71.9",
130
+ "react-native-gradle-plugin": "^0.71.10",
131
131
  "react-refresh": "^0.4.0",
132
132
  "react-shallow-renderer": "^16.15.0",
133
133
  "regenerator-runtime": "^0.13.2",
package/react.gradle CHANGED
@@ -442,11 +442,11 @@ afterEvaluate {
442
442
 
443
443
  if (cleanup) {
444
444
  // Reduce size by deleting the debugger/inspector
445
- include '**/libhermes-executor-debug.so'
445
+ include '**/libhermes_executor_debug.so'
446
446
  } else {
447
447
  // Release libs take precedence and must be removed
448
448
  // to allow debugging
449
- include '**/libhermes-executor-release.so'
449
+ include '**/libhermes_executor_release.so'
450
450
  }
451
451
  } else {
452
452
  // For JSC, delete all the libhermes* files
@@ -11,9 +11,9 @@ require_relative './utils.rb'
11
11
  # @parameter fabric_enabled: whether Fabirc is enabled
12
12
  def setup_jsc!(react_native_path: "../node_modules/react-native", fabric_enabled: false)
13
13
  pod 'React-jsi', :path => "#{react_native_path}/ReactCommon/jsi"
14
- pod 'React-jsc', :path => "#{react_native_path}/ReactCommon/jsi"
14
+ pod 'React-jsc', :path => "#{react_native_path}/ReactCommon/jsc"
15
15
  if fabric_enabled
16
- pod 'React-jsc/Fabric', :path => "#{react_native_path}/ReactCommon/jsi"
16
+ pod 'React-jsc/Fabric', :path => "#{react_native_path}/ReactCommon/jsc"
17
17
  end
18
18
  end
19
19
 
@@ -100,7 +100,7 @@ def use_react_native! (
100
100
  else
101
101
  setup_jsc!(:react_native_path => prefix, :fabric_enabled => fabric_enabled)
102
102
  end
103
- pod 'React-jsidynamic', :path => "#{prefix}/ReactCommon/jsi"
103
+
104
104
  pod 'React-jsiexecutor', :path => "#{prefix}/ReactCommon/jsiexecutor"
105
105
  pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
106
106
 
@@ -13,8 +13,6 @@ GENERATED_SCHEMA_FILE="$GENERATED_SRCS_DIR/schema.json"
13
13
 
14
14
  cd "$RCT_SCRIPT_RN_DIR"
15
15
 
16
- CODEGEN_REPO_PATH="$RCT_SCRIPT_RN_DIR/packages/react-native-codegen"
17
- CODEGEN_NPM_PATH="$RCT_SCRIPT_RN_DIR/../react-native-codegen"
18
16
  CODEGEN_CLI_PATH=""
19
17
 
20
18
  error () {
@@ -23,15 +21,6 @@ error () {
23
21
  exit 1
24
22
  }
25
23
 
26
- # Determine path to react-native-codegen
27
- if [ -d "$CODEGEN_REPO_PATH" ]; then
28
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd)
29
- elif [ -d "$CODEGEN_NPM_PATH" ]; then
30
- CODEGEN_CLI_PATH=$(cd "$CODEGEN_NPM_PATH" && pwd)
31
- else
32
- error "error: Could not determine react-native-codegen location in $CODEGEN_REPO_PATH or $CODEGEN_NPM_PATH. Try running 'yarn install' or 'npm install' in your project root."
33
- fi
34
-
35
24
  find_node () {
36
25
  NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
37
26
  if [ -z "$NODE_BINARY" ]; then
@@ -41,6 +30,13 @@ find_node () {
41
30
  fi
42
31
  }
43
32
 
33
+ find_codegen () {
34
+ CODEGEN_CLI_PATH=$("$NODE_BINARY" --print "require('path').dirname(require.resolve('react-native-codegen/package.json'))")
35
+ if ! [ -d "$CODEGEN_CLI_PATH" ]; then
36
+ error "error: Could not determine react-native-codegen location, using node module resolution. Try running 'yarn install' or 'npm install' in your project root."
37
+ fi
38
+ }
39
+
44
40
  setup_dirs () {
45
41
  set +e
46
42
  rm -rf "$GENERATED_SRCS_DIR"
@@ -108,7 +104,7 @@ moveOutputs () {
108
104
  mkdir -p "$RCT_SCRIPT_OUTPUT_DIR"
109
105
 
110
106
  # Copy all output to output_dir
111
- cp -R "$TEMP_OUTPUT_DIR/" "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
107
+ cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
112
108
  echo "$LIBRARY_NAME output has been written to $RCT_SCRIPT_OUTPUT_DIR:" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
113
109
  ls -1 "$RCT_SCRIPT_OUTPUT_DIR" >> "${SCRIPT_OUTPUT_FILE_0}" 2>&1
114
110
  }
@@ -116,6 +112,7 @@ moveOutputs () {
116
112
  withCodgenDiscovery () {
117
113
  setup_dirs
118
114
  find_node
115
+ find_codegen
119
116
  generateArtifacts
120
117
  moveOutputs
121
118
  }
@@ -123,6 +120,7 @@ withCodgenDiscovery () {
123
120
  noCodegenDiscovery () {
124
121
  setup_dirs
125
122
  find_node
123
+ find_codegen
126
124
  generateCodegenSchemaFromJavaScript
127
125
  generateCodegenArtifactsFromSchema
128
126
  moveOutputs
@@ -1 +1 @@
1
- hermes-2022-11-03-RNv0.71.0-85613e1f9d1216f2cce7e54604be46057092939d
1
+ hermes-2022-11-30-RNv0.71.0-1eb8f7ea3059a338205c302cea0f5a3057f93049
Binary file
Binary file
@@ -15,7 +15,7 @@ buildscript {
15
15
  mavenCentral()
16
16
  }
17
17
  dependencies {
18
- classpath("com.android.tools.build:gradle:7.3.1")
18
+ classpath("com.android.tools.build:gradle:7.4.0-beta05")
19
19
  classpath("com.facebook.react:react-native-gradle-plugin")
20
20
  }
21
21
  }
@@ -6,6 +6,12 @@ prepare_react_native_project!
6
6
 
7
7
  flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
8
8
 
9
+ linkage = ENV['USE_FRAMEWORKS']
10
+ if linkage != nil
11
+ Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
12
+ use_frameworks! :linkage => linkage.to_sym
13
+ end
14
+
9
15
  target 'HelloWorld' do
10
16
  config = use_native_modules!
11
17
 
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "18.2.0",
14
- "react-native": "0.71.0-rc.2"
14
+ "react-native": "0.71.0-rc.3"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",
@@ -1,42 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- require "json"
7
-
8
- package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
9
- version = package['version']
10
-
11
- source = { :git => 'https://github.com/facebook/react-native.git' }
12
- if version == '1000.0.0'
13
- # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
14
- source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
15
- else
16
- source[:tag] = "v#{version}"
17
- end
18
-
19
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
20
- folly_version = '2021.07.22.00'
21
- boost_compiler_flags = '-Wno-documentation'
22
-
23
- Pod::Spec.new do |s|
24
- s.name = "React-jsidynamic"
25
- s.version = version
26
- s.summary = "Provides support for converting between folly::dynamic and jsi::value"
27
- s.homepage = "https://reactnative.dev/"
28
- s.license = package["license"]
29
- s.author = "Facebook, Inc. and its affiliates"
30
- s.platforms = { :ios => "12.4" }
31
- s.source = source
32
- s.source_files = "jsi/JSIDynamic.{cpp,h}"
33
- s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
34
- s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
35
- s.header_dir = 'jsi'
36
-
37
- s.dependency "boost", "1.76.0"
38
- s.dependency "DoubleConversion"
39
- s.dependency "RCT-Folly", folly_version
40
- s.dependency "glog"
41
- s.dependency "React-jsi", version
42
- end