react-native 0.68.0-rc.1 → 0.68.0-rc.4

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 (79) hide show
  1. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  2. package/Libraries/Components/Switch/Switch.js +2 -1
  3. package/Libraries/Core/ReactNativeVersion.js +1 -1
  4. package/Libraries/Image/React-RCTImage.podspec +1 -1
  5. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  6. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
  7. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  8. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  9. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  10. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +1 -29
  11. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +2 -0
  12. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  13. package/React/Base/RCTVersion.m +1 -1
  14. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +4 -7
  15. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +4 -2
  16. package/React/CoreModules/React-CoreModules.podspec +1 -1
  17. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +4 -2
  18. package/React/React-RCTFabric.podspec +1 -1
  19. package/ReactAndroid/build.gradle +1 -1
  20. package/ReactAndroid/gradle.properties +1 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +0 -3
  22. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java +0 -5
  24. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +0 -12
  25. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  26. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +5 -5
  27. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +5 -3
  28. package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +7 -5
  29. package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +1 -1
  30. package/android/com/facebook/react/react-native/{0.68.0-rc.1/react-native-0.68.0-rc.1-sources.jar → 0.68.0-rc.4/react-native-0.68.0-rc.4-sources.jar} +0 -0
  31. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4-sources.jar.md5 +1 -0
  32. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4-sources.jar.sha1 +1 -0
  33. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4-sources.jar.sha256 +1 -0
  34. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4-sources.jar.sha512 +1 -0
  35. package/android/com/facebook/react/react-native/{0.68.0-rc.1/react-native-0.68.0-rc.1.aar → 0.68.0-rc.4/react-native-0.68.0-rc.4.aar} +0 -0
  36. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.aar.md5 +1 -0
  37. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.aar.sha1 +1 -0
  38. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.aar.sha256 +1 -0
  39. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.aar.sha512 +1 -0
  40. package/android/com/facebook/react/react-native/{0.68.0-rc.1/react-native-0.68.0-rc.1.module → 0.68.0-rc.4/react-native-0.68.0-rc.4.module} +15 -15
  41. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.module.md5 +1 -0
  42. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.module.sha1 +1 -0
  43. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.module.sha256 +1 -0
  44. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.module.sha512 +1 -0
  45. package/android/com/facebook/react/react-native/{0.68.0-rc.1/react-native-0.68.0-rc.1.pom → 0.68.0-rc.4/react-native-0.68.0-rc.4.pom} +1 -1
  46. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.pom.md5 +1 -0
  47. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.pom.sha1 +1 -0
  48. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.pom.sha256 +1 -0
  49. package/android/com/facebook/react/react-native/0.68.0-rc.4/react-native-0.68.0-rc.4.pom.sha512 +1 -0
  50. package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
  51. package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
  52. package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
  53. package/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
  54. package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
  55. package/package.json +3 -2
  56. package/react.gradle +52 -15
  57. package/scripts/react_native_pods.rb +21 -9
  58. package/template/Gemfile.lock +7 -7
  59. package/template/_flowconfig +2 -0
  60. package/template/android/app/build.gradle +28 -8
  61. package/template/ios/Podfile +2 -2
  62. package/template/package.json +1 -5
  63. package/third-party-podspecs/RCT-Folly.podspec +5 -1
  64. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1-sources.jar.md5 +0 -1
  65. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1-sources.jar.sha1 +0 -1
  66. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1-sources.jar.sha256 +0 -1
  67. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1-sources.jar.sha512 +0 -1
  68. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.aar.md5 +0 -1
  69. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.aar.sha1 +0 -1
  70. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.aar.sha256 +0 -1
  71. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.aar.sha512 +0 -1
  72. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.module.md5 +0 -1
  73. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.module.sha1 +0 -1
  74. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.module.sha256 +0 -1
  75. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.module.sha512 +0 -1
  76. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.pom.md5 +0 -1
  77. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.pom.sha1 +0 -1
  78. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.pom.sha256 +0 -1
  79. package/android/com/facebook/react/react-native/0.68.0-rc.1/react-native-0.68.0-rc.1.pom.sha512 +0 -1
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.pod_target_xcconfig = {
36
36
  "USE_HEADERMAP" => "YES",
37
37
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
38
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
38
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
39
39
  }
40
40
 
41
41
  s.dependency "RCT-Folly", folly_version
@@ -170,7 +170,8 @@ const SwitchWithForwardedRef: React.AbstractComponent<
170
170
  // that the update should be ignored and we should stick with the value
171
171
  // that we have in JS.
172
172
  const jsValue = value === true;
173
- const shouldUpdateNativeSwitch = native.value !== jsValue;
173
+ const shouldUpdateNativeSwitch =
174
+ native.value != null && native.value !== jsValue;
174
175
  if (
175
176
  shouldUpdateNativeSwitch &&
176
177
  nativeSwitchRef.current?.setNativeProps != null
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 68,
15
15
  patch: 0,
16
- prerelease: 'rc.1',
16
+ prerelease: 'rc.4',
17
17
  };
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
39
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
40
40
  }
41
41
 
42
42
  s.dependency "RCT-Folly", folly_version
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
39
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
40
40
  }
41
41
 
42
42
  s.dependency "React-Codegen", version
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.pod_target_xcconfig = {
36
36
  "USE_HEADERMAP" => "YES",
37
37
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
38
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
38
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
39
39
  }
40
40
 
41
41
  s.dependency "RCT-Folly", folly_version
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.pod_target_xcconfig = {
36
36
  "USE_HEADERMAP" => "YES",
37
37
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
38
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
38
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
39
39
  }
40
40
  s.frameworks = "MobileCoreServices"
41
41
 
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
39
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
40
40
  }
41
41
  s.framework = "UserNotifications"
42
42
 
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
39
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
40
40
  }
41
41
 
42
42
  s.dependency "RCT-Folly", folly_version
@@ -147,21 +147,7 @@ static UIColor *defaultPlaceholderColor()
147
147
 
148
148
  - (void)setAttributedText:(NSAttributedString *)attributedText
149
149
  {
150
- // Using `setAttributedString:` while user is typing breaks some internal mechanics
151
- // when entering complex input languages such as Chinese, Korean or Japanese.
152
- // see: https://github.com/facebook/react-native/issues/19339
153
-
154
- // We try to avoid calling this method as much as we can.
155
- // If the text has changed, there is nothing we can do.
156
- if (![super.attributedText.string isEqualToString:attributedText.string]) {
157
- [super setAttributedText:attributedText];
158
- } else {
159
- // But if the text is preserved, we just copying the attributes from the source string.
160
- if (![super.attributedText isEqualToAttributedString:attributedText]) {
161
- [self copyTextAttributesFrom:attributedText];
162
- }
163
- }
164
-
150
+ [super setAttributedText:attributedText];
165
151
  [self textDidChange];
166
152
  }
167
153
 
@@ -311,18 +297,4 @@ static UIColor *defaultPlaceholderColor()
311
297
 
312
298
  #pragma mark - Utility Methods
313
299
 
314
- - (void)copyTextAttributesFrom:(NSAttributedString *)sourceString
315
- {
316
- [self.textStorage beginEditing];
317
-
318
- NSTextStorage *textStorage = self.textStorage;
319
- [sourceString enumerateAttributesInRange:NSMakeRange(0, sourceString.length)
320
- options:NSAttributedStringEnumerationReverse
321
- usingBlock:^(NSDictionary<NSAttributedStringKey,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
322
- [textStorage setAttributes:attrs range:range];
323
- }];
324
-
325
- [self.textStorage endEditing];
326
- }
327
-
328
300
  @end
@@ -104,6 +104,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
104
104
  // Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
105
105
  // text that we should disregard. See https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc
106
106
  // for more info.
107
+ // Also, updating the attributed text while inputting Korean language will break input mechanism.
107
108
  // If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in NSOriginalFont.
108
109
  // Lastly, when entering a password, etc., there will be additional styling on the field as the native text view
109
110
  // handles showing the last character for a split second.
@@ -116,6 +117,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
116
117
 
117
118
  BOOL shouldFallbackToBareTextComparison =
118
119
  [self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
120
+ [self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
119
121
  self.backedTextInputView.markedTextRange ||
120
122
  self.backedTextInputView.isSecureTextEntry ||
121
123
  fontHasBeenUpdatedBySystem;
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
38
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
39
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
40
40
  }
41
41
  s.frameworks = "AudioToolbox"
42
42
 
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(68),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.1",
27
+ RCTVersionPrerelease: @"rc.4",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -73,13 +73,10 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
73
73
  // `RCTRootViewSizeFlexibilityNone` is the RCTRootView's default.
74
74
  RCTSurfaceSizeMeasureMode sizeMeasureMode = convertToSurfaceSizeMeasureMode(RCTRootViewSizeFlexibilityNone);
75
75
 
76
- id<RCTSurfaceProtocol> surface = [[self class] createSurfaceWithBridge:bridge
77
- moduleName:moduleName
78
- initialProperties:initialProperties];
79
- [surface start];
80
- if (self = [super initWithSurface:surface sizeMeasureMode:sizeMeasureMode]) {
81
- // Nothing specific to do.
82
- }
76
+ self = [super initWithBridge:bridge
77
+ moduleName:moduleName
78
+ initialProperties:initialProperties
79
+ sizeMeasureMode:sizeMeasureMode];
83
80
 
84
81
  RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");
85
82
 
@@ -46,8 +46,10 @@ RCT_NOT_IMPLEMENTED(-(nullable instancetype)initWithCoder : (NSCoder *)coder)
46
46
  id<RCTSurfaceProtocol> surface = [[self class] createSurfaceWithBridge:bridge
47
47
  moduleName:moduleName
48
48
  initialProperties:initialProperties];
49
- [surface start];
50
- return [self initWithSurface:surface sizeMeasureMode:sizeMeasureMode];
49
+ if (self = [self initWithSurface:surface sizeMeasureMode:sizeMeasureMode]) {
50
+ [surface start];
51
+ }
52
+ return self;
51
53
  }
52
54
 
53
55
  - (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
34
34
  s.pod_target_xcconfig = {
35
35
  "USE_HEADERMAP" => "YES",
36
36
  "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
37
- "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
37
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
38
38
  }
39
39
 
40
40
  s.dependency "React-Codegen", version
@@ -617,8 +617,9 @@ using namespace facebook::react;
617
617
  // the settings on a dictation.
618
618
  // Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the
619
619
  // text that we should disregard. See
620
- // https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. If
621
- // the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
620
+ // https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info.
621
+ // Also, updating the attributed text while inputting Korean language will break input mechanism.
622
+ // If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in
622
623
  // NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native
623
624
  // text view handles showing the last character for a split second.
624
625
  __block BOOL fontHasBeenUpdatedBySystem = false;
@@ -633,6 +634,7 @@ using namespace facebook::react;
633
634
 
634
635
  BOOL shouldFallbackToBareTextComparison =
635
636
  [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] ||
637
+ [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] ||
636
638
  _backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem;
637
639
 
638
640
  if (shouldFallbackToBareTextComparison) {
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
36
36
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
37
37
  s.header_dir = "React"
38
38
  s.framework = "JavaScriptCore"
39
- s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\"" }
39
+ s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" }
40
40
  s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"",
41
41
  "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags }
42
42
 
@@ -406,7 +406,7 @@ react {
406
406
  // This should be changed to a more generic name, e.g. `ReactCoreSpec`.
407
407
  libraryName = "rncore"
408
408
  jsRootDir = file("../Libraries")
409
- reactRoot = file("$projectDir/..")
409
+ reactNativeDir = file("$projectDir/..")
410
410
  useJavaGenerator = System.getenv("USE_CODEGEN_JAVAPOET")?.toBoolean() ?: false
411
411
  // We search for the codegen in either one of the `node_modules` folder or in the
412
412
  // root packages folder (that's for when we build from source without calling `yarn install`).
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.68.0-rc.1
1
+ VERSION_NAME=0.68.0-rc.4
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -102,9 +102,6 @@ public class ReactFeatureFlags {
102
102
 
103
103
  public static boolean insertZReorderBarriersOnViewGroupChildren = true;
104
104
 
105
- /** TODO: T103427072 Delete ReactFeatureFlags.enableNestedTextOnPressEventFix */
106
- public static boolean enableNestedTextOnPressEventFix = true;
107
-
108
105
  /** TODO: T107492383 Delete this flag. Enables postprocessor for rounded corners for Image */
109
106
  public static boolean enableRoundedCornerPostprocessing = false;
110
107
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 68,
20
20
  "patch", 0,
21
- "prerelease", "rc.1");
21
+ "prerelease", "rc.4");
22
22
  }
@@ -343,11 +343,6 @@ public class ReactTextShadowNode extends ReactBaseTextShadowNode {
343
343
  mJustificationMode);
344
344
  uiViewOperationQueue.enqueueUpdateExtraData(getReactTag(), reactTextUpdate);
345
345
  }
346
-
347
- if (mAdjustsFontSizeToFit) {
348
- // Nodes with `adjustsFontSizeToFit` enabled need to be remeasured on every relayout.
349
- markUpdated();
350
- }
351
346
  }
352
347
 
353
348
  @ReactProp(name = "onTextLayout")
@@ -19,7 +19,6 @@ import android.text.TextUtils;
19
19
  import android.text.method.LinkMovementMethod;
20
20
  import android.text.util.Linkify;
21
21
  import android.view.Gravity;
22
- import android.view.MotionEvent;
23
22
  import android.view.View;
24
23
  import android.view.ViewGroup;
25
24
  import androidx.annotation.Nullable;
@@ -32,7 +31,6 @@ import com.facebook.react.bridge.ReactContext;
32
31
  import com.facebook.react.bridge.WritableArray;
33
32
  import com.facebook.react.bridge.WritableMap;
34
33
  import com.facebook.react.common.ReactConstants;
35
- import com.facebook.react.config.ReactFeatureFlags;
36
34
  import com.facebook.react.uimanager.PixelUtil;
37
35
  import com.facebook.react.uimanager.ReactCompoundView;
38
36
  import com.facebook.react.uimanager.UIManagerModule;
@@ -384,16 +382,6 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
384
382
  return target;
385
383
  }
386
384
 
387
- @Override
388
- public boolean onTouchEvent(MotionEvent ev) {
389
- // The root view always assumes any view that was tapped wants the touch
390
- // and sends the event to JS as such.
391
- // We don't need to do bubbling in native (it's already happening in JS).
392
- // For an explanation of bubbling and capturing, see
393
- // http://javascript.info/tutorial/bubbling-and-capturing#capturing
394
- return ReactFeatureFlags.enableNestedTextOnPressEventFix;
395
- }
396
-
397
385
  @Override
398
386
  protected boolean verifyDrawable(Drawable drawable) {
399
387
  if (mContainsImages && getText() instanceof Spanned) {
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 68;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.1";
21
+ std::string_view Prerelease = "rc.4";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -33,11 +33,11 @@ MapBuffer::MapBuffer(std::vector<uint8_t> data) : bytes_(std::move(data)) {
33
33
  }
34
34
  }
35
35
 
36
- uint32_t MapBuffer::getKeyBucket(Key key) const {
37
- uint32_t lo = 0;
38
- uint32_t hi = count_ - 1;
36
+ int32_t MapBuffer::getKeyBucket(Key key) const {
37
+ int32_t lo = 0;
38
+ int32_t hi = count_ - 1;
39
39
  while (lo <= hi) {
40
- uint32_t mid = (lo + hi) >> 1;
40
+ int32_t mid = (lo + hi) >> 1;
41
41
 
42
42
  Key midVal =
43
43
  *reinterpret_cast<Key const *>(bytes_.data() + bucketOffset(mid));
@@ -112,7 +112,7 @@ MapBuffer MapBuffer::getMapBuffer(Key key) const {
112
112
  return MapBuffer(std::move(value));
113
113
  }
114
114
 
115
- uint32_t MapBuffer::size() const {
115
+ size_t MapBuffer::size() const {
116
116
  return bytes_.size();
117
117
  }
118
118
 
@@ -80,7 +80,8 @@ class MapBuffer {
80
80
  uint32_t bufferSize; // Amount of bytes used to store the map in memory
81
81
  };
82
82
 
83
- struct __attribute__((__packed__)) Bucket {
83
+ #pragma pack(push, 1)
84
+ struct Bucket {
84
85
  Key key;
85
86
  uint16_t type;
86
87
  uint64_t data;
@@ -88,6 +89,7 @@ class MapBuffer {
88
89
  Bucket(Key key, uint16_t type, uint64_t data)
89
90
  : key(key), type(type), data(data) {}
90
91
  };
92
+ #pragma pack(pop)
91
93
 
92
94
  static_assert(sizeof(Header) == 8, "MapBuffer header size is incorrect.");
93
95
  static_assert(sizeof(Bucket) == 12, "MapBuffer bucket size is incorrect.");
@@ -124,7 +126,7 @@ class MapBuffer {
124
126
  // TODO T83483191: review this declaration
125
127
  MapBuffer getMapBuffer(MapBuffer::Key key) const;
126
128
 
127
- uint32_t size() const;
129
+ size_t size() const;
128
130
 
129
131
  uint8_t const *data() const;
130
132
 
@@ -140,7 +142,7 @@ class MapBuffer {
140
142
  // returns the relative offset of the first byte of dynamic data
141
143
  int32_t getDynamicDataOffset() const;
142
144
 
143
- uint32_t getKeyBucket(MapBuffer::Key key) const;
145
+ int32_t getKeyBucket(MapBuffer::Key key) const;
144
146
 
145
147
  friend ReadableMapBuffer;
146
148
  };
@@ -14,7 +14,7 @@ namespace facebook {
14
14
  namespace react {
15
15
 
16
16
  constexpr uint32_t INT_SIZE = sizeof(uint32_t);
17
- constexpr double DOUBLE_SIZE = sizeof(double);
17
+ constexpr uint32_t DOUBLE_SIZE = sizeof(double);
18
18
  constexpr uint32_t MAX_BUCKET_VALUE_SIZE = sizeof(uint64_t);
19
19
 
20
20
  MapBuffer MapBufferBuilder::EMPTY() {
@@ -23,6 +23,8 @@ MapBuffer MapBufferBuilder::EMPTY() {
23
23
 
24
24
  MapBufferBuilder::MapBufferBuilder(uint32_t initialSize) {
25
25
  buckets_.reserve(initialSize);
26
+ header_.count = 0;
27
+ header_.bufferSize = 0;
26
28
  }
27
29
 
28
30
  void MapBufferBuilder::storeKeyValue(
@@ -76,7 +78,7 @@ void MapBufferBuilder::putInt(MapBuffer::Key key, int32_t value) {
76
78
  }
77
79
 
78
80
  void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) {
79
- int32_t strSize = value.size();
81
+ auto strSize = value.size();
80
82
  const char *strData = value.data();
81
83
 
82
84
  // format [length of string (int)] + [Array of Characters in the string]
@@ -94,7 +96,7 @@ void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) {
94
96
  }
95
97
 
96
98
  void MapBufferBuilder::putMapBuffer(MapBuffer::Key key, MapBuffer const &map) {
97
- int32_t mapBufferSize = map.size();
99
+ auto mapBufferSize = map.size();
98
100
 
99
101
  auto offset = dynamicData_.size();
100
102
 
@@ -122,9 +124,9 @@ MapBuffer MapBufferBuilder::build() {
122
124
  // Create buffer: [header] + [key, values] + [dynamic data]
123
125
  auto bucketSize = buckets_.size() * sizeof(MapBuffer::Bucket);
124
126
  auto headerSize = sizeof(MapBuffer::Header);
125
- uint32_t bufferSize = headerSize + bucketSize + dynamicData_.size();
127
+ auto bufferSize = headerSize + bucketSize + dynamicData_.size();
126
128
 
127
- header_.bufferSize = bufferSize;
129
+ header_.bufferSize = static_cast<uint32_t>(bufferSize);
128
130
 
129
131
  if (needsSort_) {
130
132
  std::sort(buckets_.begin(), buckets_.end(), compareBuckets);
@@ -38,7 +38,7 @@ class MapBufferBuilder {
38
38
  MapBuffer build();
39
39
 
40
40
  private:
41
- MapBuffer::Header header_ = {.count = 0, .bufferSize = 0};
41
+ MapBuffer::Header header_;
42
42
 
43
43
  std::vector<MapBuffer::Bucket> buckets_{};
44
44
 
@@ -0,0 +1 @@
1
+ 150b7a188a54d40798935d447e3047e995334422
@@ -0,0 +1 @@
1
+ 618f6eb909a92a352bbb839c00cd0f4b776a6123642352baf2bee0ed874de0f6
@@ -0,0 +1 @@
1
+ 5b224b392a51e5fab6ad43f5c9d1ffb0df9786336785e85b1abcc7cf4a572c2193766068c24ad00649940369bbd3d042e9011de2c0408009de74d4cc0d82ad28
@@ -0,0 +1 @@
1
+ 88f701d2a7428778ad561ba69f7b4aad80a4a74b
@@ -0,0 +1 @@
1
+ 5828625bb3c9ac9d98b6de0b2559dfd63af35ea19811af169eecad1e509ac12e
@@ -0,0 +1 @@
1
+ 7684c75039e3b9ec07cdfd39214e04f28730285bbe5773a55b18fd278db8cef339a39285f0baaecdabf01a205cbdfc704539288ae03b020725ca07f79b704414
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "com.facebook.react",
5
5
  "module": "react-native",
6
- "version": "0.68.0-rc.1",
6
+ "version": "0.68.0-rc.4",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -131,13 +131,13 @@
131
131
  ],
132
132
  "files": [
133
133
  {
134
- "name": "react-native-0.68.0-rc.1.aar",
135
- "url": "react-native-0.68.0-rc.1.aar",
136
- "size": 16395276,
137
- "sha512": "2959cdc03a904f7f6845c88d017432592a04c96283018287625735536ea92cef4fe29393809c5b7e63fdb13097c4b8fbaf4ea22c4cfab99a1a9dc13bedd62d8f",
138
- "sha256": "6073f03f09bda95a8b83931de5e7f046bda458296fa3c9760454205c2e353957",
139
- "sha1": "115c2ad91875cab758d40483cfb0aba6c6eff212",
140
- "md5": "52df61c91e6e1dc484b6f7041da9ce3e"
134
+ "name": "react-native-0.68.0-rc.4.aar",
135
+ "url": "react-native-0.68.0-rc.4.aar",
136
+ "size": 16395231,
137
+ "sha512": "7684c75039e3b9ec07cdfd39214e04f28730285bbe5773a55b18fd278db8cef339a39285f0baaecdabf01a205cbdfc704539288ae03b020725ca07f79b704414",
138
+ "sha256": "5828625bb3c9ac9d98b6de0b2559dfd63af35ea19811af169eecad1e509ac12e",
139
+ "sha1": "88f701d2a7428778ad561ba69f7b4aad80a4a74b",
140
+ "md5": "21bbd956d29f733e5079798166b5b221"
141
141
  }
142
142
  ]
143
143
  },
@@ -258,13 +258,13 @@
258
258
  ],
259
259
  "files": [
260
260
  {
261
- "name": "react-native-0.68.0-rc.1.aar",
262
- "url": "react-native-0.68.0-rc.1.aar",
263
- "size": 16395276,
264
- "sha512": "2959cdc03a904f7f6845c88d017432592a04c96283018287625735536ea92cef4fe29393809c5b7e63fdb13097c4b8fbaf4ea22c4cfab99a1a9dc13bedd62d8f",
265
- "sha256": "6073f03f09bda95a8b83931de5e7f046bda458296fa3c9760454205c2e353957",
266
- "sha1": "115c2ad91875cab758d40483cfb0aba6c6eff212",
267
- "md5": "52df61c91e6e1dc484b6f7041da9ce3e"
261
+ "name": "react-native-0.68.0-rc.4.aar",
262
+ "url": "react-native-0.68.0-rc.4.aar",
263
+ "size": 16395231,
264
+ "sha512": "7684c75039e3b9ec07cdfd39214e04f28730285bbe5773a55b18fd278db8cef339a39285f0baaecdabf01a205cbdfc704539288ae03b020725ca07f79b704414",
265
+ "sha256": "5828625bb3c9ac9d98b6de0b2559dfd63af35ea19811af169eecad1e509ac12e",
266
+ "sha1": "88f701d2a7428778ad561ba69f7b4aad80a4a74b",
267
+ "md5": "21bbd956d29f733e5079798166b5b221"
268
268
  }
269
269
  ]
270
270
  }
@@ -0,0 +1 @@
1
+ 166f02b50fc554b52c51d4415462181f08e37ada
@@ -0,0 +1 @@
1
+ 28869b35c16971c8a71a5065cdc54711c72239daf8a6bf8e3b6b454225a6625d
@@ -0,0 +1 @@
1
+ 9bfeb1156cdf69f64b8efe53dfee2b65922bd845a067c76faa78412b71e854144ccf970669ce2d90ecad5eba7bf448b1fa8fe8c6b1676156c24003e473618ab8
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>com.facebook.react</groupId>
11
11
  <artifactId>react-native</artifactId>
12
- <version>0.68.0-rc.1</version>
12
+ <version>0.68.0-rc.4</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>ReactNative</name>
15
15
  <description>A framework for building native apps with React</description>
@@ -0,0 +1 @@
1
+ b2bfa3ece500979326dedf024d52780f20289959
@@ -0,0 +1 @@
1
+ 21461eb4d8808531bb3d540bb6108519ce2006b76569e732193448fa57d23492
@@ -0,0 +1 @@
1
+ a337720a2e0f8aada7e7cbd965b69bb51af5299d962e1062f573acf179a010b8e7474b1a0dfea0fa1d15c82998e75e2f241276ccc10bbee0044f79c0987025ae
@@ -3,11 +3,11 @@
3
3
  <groupId>com.facebook.react</groupId>
4
4
  <artifactId>react-native</artifactId>
5
5
  <versioning>
6
- <latest>0.68.0-rc.1</latest>
7
- <release>0.68.0-rc.1</release>
6
+ <latest>0.68.0-rc.4</latest>
7
+ <release>0.68.0-rc.4</release>
8
8
  <versions>
9
- <version>0.68.0-rc.1</version>
9
+ <version>0.68.0-rc.4</version>
10
10
  </versions>
11
- <lastUpdated>20220203174340</lastUpdated>
11
+ <lastUpdated>20220325145553</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- aa457a3e7ea2c6e4f0b8f6a08958c8ff
1
+ 61f8e5a1bfd4bd678d2d2dc4e4bd10e4
@@ -1 +1 @@
1
- 5ceb80dd1d92fcdf0d07bdd822f5ba9f539eb7ef
1
+ 98d9276424850b7afa9efbbfa932fe0c28eb3feb
@@ -1 +1 @@
1
- 0bd0710cd56264137900969f9ed30ea4c4f8a18eee068844a9fa3843e11b03b6
1
+ 9333d75067ea241417ed137094080f0062ba3a1ebed316d838d920b8205665ac
@@ -1 +1 @@
1
- 70ade999243740c2e1f9494292a1aa855813555ff0b8428f638b13771d32ed6c6b842993f0d970498d5427b04f18ba9a956e9f73bffe979703ddbd3a11696f34
1
+ 16afea73a6fe60bd742ba7d2cf8144e8df3abcf1a9aa3d9651beb23346e567ba590ce9bad8523f5964c0a855b09fe77820d7c962de1466c678894dc87cb343a0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.68.0-rc.1",
3
+ "version": "0.68.0-rc.4",
4
4
  "bin": "./cli.js",
5
5
  "description": "A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@jest/create-cache-key-function": "^27.0.1",
90
- "@react-native-community/cli": "^7.0.1",
90
+ "@react-native-community/cli": "^7.0.3",
91
91
  "@react-native-community/cli-platform-android": "^7.0.1",
92
92
  "@react-native-community/cli-platform-ios": "^7.0.1",
93
93
  "@react-native/assets": "1.0.0",
@@ -108,6 +108,7 @@
108
108
  "pretty-format": "^26.5.2",
109
109
  "promise": "^8.0.3",
110
110
  "react-devtools-core": "^4.23.0",
111
+ "react-native-gradle-plugin": "^0.0.5",
111
112
  "react-refresh": "^0.4.0",
112
113
  "react-shallow-renderer": "16.14.1",
113
114
  "regenerator-runtime": "^0.13.2",
package/react.gradle CHANGED
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import org.apache.tools.ant.taskdefs.condition.Os
9
+ import org.gradle.internal.jvm.Jvm
9
10
 
10
11
  def config = project.hasProperty("react") ? project.react : [:];
11
12
 
@@ -21,20 +22,6 @@ def detectEntryFile(config) {
21
22
  return "index.js";
22
23
  }
23
24
 
24
- /**
25
- * Detects CLI location in a similar fashion to the React Native CLI
26
- */
27
- def detectCliPath(config) {
28
- if (config.cliPath) {
29
- return "${projectDir}/${config.cliPath}"
30
- }
31
- if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
32
- return "${projectDir}/../../node_modules/react-native/cli.js"
33
- }
34
- throw new Exception("Couldn't determine CLI location. " +
35
- "Please set `project.ext.react.cliPath` to the path of the react-native cli.js file. This file typically resides in `node_modules/react-native/cli.js`");
36
- }
37
-
38
25
  def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
39
26
  def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
40
27
  def entryFile = detectEntryFile(config)
@@ -45,6 +32,43 @@ def bundleConfig = config.bundleConfig ? "${reactRoot}/${config.bundleConfig}" :
45
32
  def enableVmCleanup = config.enableVmCleanup == null ? true : config.enableVmCleanup
46
33
  def hermesCommand = config.hermesCommand ?: "../../node_modules/hermes-engine/%OS-BIN%/hermesc"
47
34
 
35
+ /**
36
+ * Detects CLI location in a similar fashion to the React Native CLI
37
+ */
38
+ def detectCliPath(config, reactRoot) {
39
+ // 1. preconfigured path
40
+ if (config.cliPath) {
41
+ def cliJsAbsolute = new File(config.cliPath)
42
+ if (cliJsAbsolute.exists()) {
43
+ return cliJsAbsolute.getAbsolutePath()
44
+ }
45
+ def cliJsRelativeToRoot = new File("${rootDir}/${config.cliPath}")
46
+ if (cliJsRelativeToRoot.exists()) {
47
+ return cliJsRelativeToRoot.getAbsolutePath()
48
+ }
49
+ def cliJsRelativeToProject = new File("${projectDir}/${config.cliPath}")
50
+ if (cliJsRelativeToProject.exists()) {
51
+ return cliJsRelativeToProject.getAbsolutePath()
52
+ }
53
+ }
54
+
55
+ // 2. node module path
56
+ def cliJsFromNode = new File(["node", "--print", "require.resolve('react-native/cli').bin"].execute(null, rootDir).text.trim())
57
+ if (cliJsFromNode.exists()) {
58
+ return cliJsFromNode.getAbsolutePath()
59
+ }
60
+
61
+ // 3. cli.js in the root folder
62
+ def rootCliJs = new File(reactRoot, "node_modules/react-native/cli.js")
63
+ if (rootCliJs.exists()) {
64
+ return rootCliJs.getAbsolutePath()
65
+ }
66
+
67
+ throw new Exception("Couldn't determine CLI location. " +
68
+ "Please set `project.ext.react.cliPath` to the path of the react-native cli.js file. " +
69
+ "This file typically resides in `node_modules/react-native/cli.js`");
70
+ }
71
+
48
72
  def reactNativeDevServerPort() {
49
73
  def value = project.getProperties().get("reactNativeDevServerPort")
50
74
  return value != null ? value : "8081"
@@ -129,6 +153,19 @@ android {
129
153
  }
130
154
  }
131
155
 
156
+ def jvmVersion = Jvm.current().javaVersion.majorVersion
157
+ if (jvmVersion.toInteger() <= 8) {
158
+ println "\n\n\n"
159
+ println "**************************************************************************************************************"
160
+ println "\n\n"
161
+ println "ERROR: requires JDK11 or higher."
162
+ println "Incompatible major version detected: '" + jvmVersion + "'"
163
+ println "\n\n"
164
+ println "**************************************************************************************************************"
165
+ println "\n\n\n"
166
+ System.exit(1)
167
+ }
168
+
132
169
  afterEvaluate {
133
170
  def isAndroidLibrary = plugins.hasPlugin("com.android.library")
134
171
  def variants = isAndroidLibrary ? android.libraryVariants : android.applicationVariants
@@ -150,7 +187,7 @@ afterEvaluate {
150
187
 
151
188
  // Additional node and packager commandline arguments
152
189
  def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
153
- def cliPath = detectCliPath(config)
190
+ def cliPath = detectCliPath(config, reactRoot)
154
191
 
155
192
  def execCommand = []
156
193
 
@@ -131,10 +131,10 @@ end
131
131
  def use_flipper!(versions = {}, configurations: ['Debug'])
132
132
  versions['Flipper'] ||= '0.125.0'
133
133
  versions['Flipper-Boost-iOSX'] ||= '1.76.0.1.11'
134
- versions['Flipper-DoubleConversion'] ||= '3.1.7'
134
+ versions['Flipper-DoubleConversion'] ||= '3.2.0'
135
135
  versions['Flipper-Fmt'] ||= '7.1.7'
136
136
  versions['Flipper-Folly'] ||= '2.6.10'
137
- versions['Flipper-Glog'] ||= '0.3.9'
137
+ versions['Flipper-Glog'] ||= '0.5.0.4'
138
138
  versions['Flipper-PeerTalk'] ||= '0.0.4'
139
139
  versions['Flipper-RSocket'] ||= '1.4.3'
140
140
  versions['OpenSSL-Universal'] ||= '1.1.1100'
@@ -176,6 +176,15 @@ def flipper_post_install(installer)
176
176
  config.build_settings['SWIFT_VERSION'] = '4.1'
177
177
  end
178
178
  end
179
+
180
+ # Enable flipper for React-Core Debug configuration
181
+ if target.name == 'React-Core'
182
+ target.build_configurations.each do |config|
183
+ if config.name == 'Debug'
184
+ config.build_settings['OTHER_CFLAGS'] = "$(inherited) -DFB_SONARKIT_ENABLED=1"
185
+ end
186
+ end
187
+ end
179
188
  end
180
189
  end
181
190
 
@@ -271,8 +280,9 @@ def modify_flags_for_new_architecture(installer, cpp_flags)
271
280
  end
272
281
 
273
282
  def build_codegen!(react_native_path)
274
- codegen_repo_path = "#{react_native_path}/packages/react-native-codegen";
275
- codegen_npm_path = "#{react_native_path}/../react-native-codegen";
283
+ relative_installation_root = Pod::Config.instance.installation_root.relative_path_from(Pathname.pwd)
284
+ codegen_repo_path = "#{relative_installation_root}/#{react_native_path}/packages/react-native-codegen";
285
+ codegen_npm_path = "#{relative_installation_root}/#{react_native_path}/../react-native-codegen";
276
286
  codegen_cli_path = ""
277
287
  if Dir.exist?(codegen_repo_path)
278
288
  codegen_cli_path = codegen_repo_path
@@ -313,7 +323,7 @@ def checkAndGenerateEmptyThirdPartyProvider!(react_native_path)
313
323
  Pod::Executable.execute_command(
314
324
  'node',
315
325
  [
316
- "#{react_native_path}/scripts/generate-provider-cli.js",
326
+ "#{relative_installation_root}/#{react_native_path}/scripts/generate-provider-cli.js",
317
327
  "--platform", 'ios',
318
328
  "--schemaListPath", temp_schema_list_path,
319
329
  "--outputDir", "#{output_dir}"
@@ -503,6 +513,7 @@ def use_react_native_codegen_discovery!(options={})
503
513
  app_path = options[:app_path]
504
514
  fabric_enabled = options[:fabric_enabled] ||= false
505
515
  config_file_dir = options[:config_file_dir] ||= ''
516
+ relative_installation_root = Pod::Config.instance.installation_root.relative_path_from(Pathname.pwd)
506
517
 
507
518
  if !app_path
508
519
  Pod::UI.warn '[Codegen] Error: app_path is required for use_react_native_codegen_discovery.'
@@ -518,7 +529,7 @@ def use_react_native_codegen_discovery!(options={})
518
529
  out = Pod::Executable.execute_command(
519
530
  'node',
520
531
  [
521
- "#{react_native_path}/scripts/generate-artifacts.js",
532
+ "#{relative_installation_root}/#{react_native_path}/scripts/generate-artifacts.js",
522
533
  "-p", "#{app_path}",
523
534
  "-o", Pod::Config.instance.installation_root,
524
535
  "-e", "#{fabric_enabled}",
@@ -540,6 +551,7 @@ def use_react_native_codegen!(spec, options={})
540
551
  library_name = options[:library_name] ||= "#{spec.name.gsub('_','-').split('-').collect(&:capitalize).join}Spec"
541
552
  Pod::UI.puts "[Codegen] Found #{library_name}"
542
553
 
554
+ relative_installation_root = Pod::Config.instance.installation_root.relative_path_from(Pathname.pwd)
543
555
  output_dir = options[:output_dir] ||= $CODEGEN_OUTPUT_DIR
544
556
  output_dir_module = "#{output_dir}/#{$CODEGEN_MODULE_DIR}"
545
557
  output_dir_component = "#{output_dir}/#{$CODEGEN_COMPONENT_DIR}"
@@ -547,7 +559,7 @@ def use_react_native_codegen!(spec, options={})
547
559
  codegen_config = {
548
560
  "modules" => {
549
561
  :js_srcs_pattern => "Native*.js",
550
- :generated_dir => "#{Pod::Config.instance.installation_root}/#{output_dir_module}/#{library_name}",
562
+ :generated_dir => "#{relative_installation_root}/#{output_dir_module}/#{library_name}",
551
563
  :generated_files => [
552
564
  "#{library_name}.h",
553
565
  "#{library_name}-generated.mm"
@@ -555,7 +567,7 @@ def use_react_native_codegen!(spec, options={})
555
567
  },
556
568
  "components" => {
557
569
  :js_srcs_pattern => "*NativeComponent.js",
558
- :generated_dir => "#{Pod::Config.instance.installation_root}/#{output_dir_component}/#{library_name}",
570
+ :generated_dir => "#{relative_installation_root}/#{output_dir_component}/#{library_name}",
559
571
  :generated_files => [
560
572
  "ComponentDescriptors.h",
561
573
  "EventEmitters.cpp",
@@ -604,7 +616,7 @@ def use_react_native_codegen!(spec, options={})
604
616
  spec.script_phase = {
605
617
  :name => 'Generate Specs',
606
618
  :input_files => input_files, # This also needs to be relative to Xcode
607
- :output_files => ["${DERIVED_FILE_DIR}/codegen-#{library_name}.log"].concat(generated_files.map { |filename| " ${PODS_TARGET_SRCROOT}/#{filename}"} ),
619
+ :output_files => ["${DERIVED_FILE_DIR}/codegen-#{library_name}.log"].concat(generated_files.map { |filename| "${PODS_TARGET_SRCROOT}/#{filename}"} ),
608
620
  # The final generated files will be created when this script is invoked at Xcode build time.
609
621
  :script => get_script_phases_no_codegen_discovery(
610
622
  react_native_path: react_native_path,
@@ -3,7 +3,7 @@ GEM
3
3
  specs:
4
4
  CFPropertyList (3.0.5)
5
5
  rexml
6
- activesupport (6.1.4.4)
6
+ activesupport (6.1.5)
7
7
  concurrent-ruby (~> 1.0, >= 1.0.2)
8
8
  i18n (>= 1.6, < 2)
9
9
  minitest (>= 5.1)
@@ -16,10 +16,10 @@ GEM
16
16
  json (>= 1.5.1)
17
17
  atomos (0.1.3)
18
18
  claide (1.1.0)
19
- cocoapods (1.11.2)
19
+ cocoapods (1.11.3)
20
20
  addressable (~> 2.8)
21
21
  claide (>= 1.0.2, < 2.0)
22
- cocoapods-core (= 1.11.2)
22
+ cocoapods-core (= 1.11.3)
23
23
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
24
24
  cocoapods-downloader (>= 1.4.0, < 2.0)
25
25
  cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -34,7 +34,7 @@ GEM
34
34
  nap (~> 1.0)
35
35
  ruby-macho (>= 1.0, < 3.0)
36
36
  xcodeproj (>= 1.21.0, < 2.0)
37
- cocoapods-core (1.11.2)
37
+ cocoapods-core (1.11.3)
38
38
  activesupport (>= 5.0, < 7)
39
39
  addressable (~> 2.8)
40
40
  algoliasearch (~> 1.0)
@@ -45,7 +45,7 @@ GEM
45
45
  public_suffix (~> 4.0)
46
46
  typhoeus (~> 1.0)
47
47
  cocoapods-deintegrate (1.0.5)
48
- cocoapods-downloader (1.5.1)
48
+ cocoapods-downloader (1.6.1)
49
49
  cocoapods-plugins (1.0.0)
50
50
  nap
51
51
  cocoapods-search (1.0.1)
@@ -54,7 +54,7 @@ GEM
54
54
  netrc (~> 0.11)
55
55
  cocoapods-try (1.2.0)
56
56
  colored2 (3.1.2)
57
- concurrent-ruby (1.1.9)
57
+ concurrent-ruby (1.1.10)
58
58
  escape (0.0.4)
59
59
  ethon (0.15.0)
60
60
  ffi (>= 1.15.0)
@@ -63,7 +63,7 @@ GEM
63
63
  fuzzy_match (2.0.4)
64
64
  gh_inspector (1.1.3)
65
65
  httpclient (2.8.3)
66
- i18n (1.9.1)
66
+ i18n (1.10.0)
67
67
  concurrent-ruby (~> 1.0)
68
68
  json (2.6.1)
69
69
  minitest (5.15.0)
@@ -11,6 +11,8 @@ node_modules/react-native/Libraries/polyfills/.*
11
11
  ; Flow doesn't support platforms
12
12
  .*/Libraries/Utilities/LoadingView.js
13
13
 
14
+ .*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15
+
14
16
  [untyped]
15
17
  .*/node_modules/@react-native-community/cli/.*/.*
16
18
 
@@ -186,6 +186,20 @@ android {
186
186
  // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
187
187
  preDebugBuild.dependsOn(packageReactNdkDebugLibs)
188
188
  preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
189
+
190
+ // Due to a bug inside AGP, we have to explicitly set a dependency
191
+ // between configureNdkBuild* tasks and the preBuild tasks.
192
+ // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
193
+ configureNdkBuildRelease.dependsOn(preReleaseBuild)
194
+ configureNdkBuildDebug.dependsOn(preDebugBuild)
195
+ reactNativeArchitectures().each { architecture ->
196
+ tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
197
+ dependsOn("preDebugBuild")
198
+ }
199
+ tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
200
+ dependsOn("preReleaseBuild")
201
+ }
202
+ }
189
203
  }
190
204
  }
191
205
 
@@ -238,14 +252,8 @@ android {
238
252
  dependencies {
239
253
  implementation fileTree(dir: "libs", include: ["*.jar"])
240
254
 
241
- // If new architecture is enabled, we let you build RN from source
242
- // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
243
- if (isNewArchitectureEnabled()) {
244
- implementation project(":ReactAndroid")
245
- } else {
246
- //noinspection GradleDynamicVersion
247
- implementation "com.facebook.react:react-native:+" // From node_modules
248
- }
255
+ //noinspection GradleDynamicVersion
256
+ implementation "com.facebook.react:react-native:+" // From node_modules
249
257
 
250
258
  implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
251
259
 
@@ -271,6 +279,18 @@ dependencies {
271
279
  }
272
280
  }
273
281
 
282
+ if (isNewArchitectureEnabled()) {
283
+ // If new architecture is enabled, we let you build RN from source
284
+ // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
285
+ // This will be applied to all the imported transtitive dependency.
286
+ configurations.all {
287
+ resolutionStrategy.dependencySubstitution {
288
+ substitute(module("com.facebook.react:react-native"))
289
+ .using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source")
290
+ }
291
+ }
292
+ }
293
+
274
294
  // Run this once to be able to run the application with BUCK
275
295
  // puts all compile dependencies into folder libs for BUCK to use
276
296
  task copyDownloadableDepsToLibs(type: Copy) {
@@ -15,8 +15,8 @@ target 'HelloWorld' do
15
15
  # to enable hermes on iOS, change `false` to `true` and then install pods
16
16
  :hermes_enabled => flags[:hermes_enabled],
17
17
  :fabric_enabled => flags[:fabric_enabled],
18
- # An abosolute path to your application root.
19
- :app_path => "#{Dir.pwd}/.."
18
+ # An absolute path to your application root.
19
+ :app_path => "#{Pod::Config.instance.installation_root}/.."
20
20
  )
21
21
 
22
22
  target 'HelloWorldTests' do
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.2",
14
- "react-native": "0.68.0-rc.1"
14
+ "react-native": "0.68.0-rc.4"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",
@@ -21,13 +21,9 @@
21
21
  "eslint": "^7.32.0",
22
22
  "jest": "^26.6.3",
23
23
  "metro-react-native-babel-preset": "^0.67.0",
24
- "react-native-gradle-plugin": "^0.0.4",
25
24
  "react-test-renderer": "17.0.2"
26
25
  },
27
26
  "jest": {
28
27
  "preset": "react-native"
29
- },
30
- "codegenConfig": {
31
- "libraries": []
32
28
  }
33
29
  }
@@ -91,7 +91,11 @@ Pod::Spec.new do |spec|
91
91
  'folly/concurrency/CacheLocality.cpp',
92
92
  'folly/detail/Futex.cpp',
93
93
  'folly/synchronization/ParkingLot.cpp',
94
- 'folly/portability/Malloc.cpp'
94
+ 'folly/portability/Malloc.cpp',
95
+ 'folly/concurrency/CacheLocality.h',
96
+ 'folly/synchronization/ParkingLot.h',
97
+ 'folly/synchronization/SanitizeThread.h',
98
+ 'folly/system/ThreadId.h'
95
99
 
96
100
  fabric.preserve_paths = 'folly/concurrency/CacheLocality.h',
97
101
  'folly/synchronization/ParkingLot.h',
@@ -1 +0,0 @@
1
- 35b5dcb1b636cb471770dd4d06d1ed2bd1c434af
@@ -1 +0,0 @@
1
- 613636cf61676a572ea38f4600557d16ce59fe09fc7c7b12d4007b0e7eaaff51
@@ -1 +0,0 @@
1
- 6f4da966cc26a8cb950b05598eeb63fc493137129392812c7ce57e52bf72d77ab8b5a8cd397d6e7c976384511a452b96a40c9347eda8d090126cc6ba03e02dbe
@@ -1 +0,0 @@
1
- 52df61c91e6e1dc484b6f7041da9ce3e
@@ -1 +0,0 @@
1
- 115c2ad91875cab758d40483cfb0aba6c6eff212
@@ -1 +0,0 @@
1
- 6073f03f09bda95a8b83931de5e7f046bda458296fa3c9760454205c2e353957
@@ -1 +0,0 @@
1
- 2959cdc03a904f7f6845c88d017432592a04c96283018287625735536ea92cef4fe29393809c5b7e63fdb13097c4b8fbaf4ea22c4cfab99a1a9dc13bedd62d8f
@@ -1 +0,0 @@
1
- 6886c8f743c45d55423cbbeb0fe8ac9481894768
@@ -1 +0,0 @@
1
- a5d9376d767535ebc2afe1835a1b66a96c4a828b3667025274dca6bf59ca1f7b
@@ -1 +0,0 @@
1
- 52eead21d799a29f90910b18862812c65e19f8846f9595b1451cbd364ba6ea6ea9f353ad18a58f63980e8842c06a7c29c169c78e6fddd573969fb7c3eeca5a3e
@@ -1 +0,0 @@
1
- 0fa24512d15617b0f6065614e9ec6c45
@@ -1 +0,0 @@
1
- 9660bcfd32f296822be3412c92337da5dc69d391
@@ -1 +0,0 @@
1
- f3e5f7d4e0627270eeaa82f3259a719b056424a7f94131b7982b3e3fba43718c
@@ -1 +0,0 @@
1
- f5cb731868236d2fab67bfe79ae21bafd97fdc0f822a3ac52d1c9d207a4087f75a39c58892c6f960e1b61f8910a00733abe90e0afebae600685b7e445b5289a2