react-native 0.71.3 → 0.71.5
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.
- package/Libraries/Blob/Blob.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +12 -5
- package/Libraries/Components/Touchable/TouchableOpacity.js +2 -3
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +2 -2
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +6 -6
- package/Libraries/Lists/FlatList.js +20 -7
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/build.gradle +9 -11
- package/ReactAndroid/gradle.properties +1 -4
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeMap.java +45 -43
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/build.gradle.kts +131 -0
- package/gradle.properties +12 -0
- package/package.json +13 -10
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/settings.gradle.kts +34 -0
- package/template/Gemfile +2 -2
- package/template/package.json +2 -2
- package/template/_ruby-version +0 -1
package/Libraries/Blob/Blob.js
CHANGED
|
@@ -105,6 +105,12 @@ class Blob {
|
|
|
105
105
|
blobId: this.data.blobId,
|
|
106
106
|
offset,
|
|
107
107
|
size,
|
|
108
|
+
/* Since `blob.slice()` creates a new view onto the same binary
|
|
109
|
+
* data as the original blob, we should re-use the same collector
|
|
110
|
+
* object so that the underlying resource gets deallocated when
|
|
111
|
+
* the last view into the data is released, not the first.
|
|
112
|
+
*/
|
|
113
|
+
__collector: this.data.__collector,
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
|
|
@@ -349,6 +349,9 @@ type IOSProps = $ReadOnly<{|
|
|
|
349
349
|
/**
|
|
350
350
|
* Give the keyboard and the system information about the
|
|
351
351
|
* expected semantic meaning for the content that users enter.
|
|
352
|
+
* `autoComplete` property accomplishes same behavior and is recommended as its supported by both platforms.
|
|
353
|
+
* Avoid using both `autoComplete` and `textContentType`, you can use `Platform.select` for differing platform behaviors.
|
|
354
|
+
* For backwards compatibility, when both set, `textContentType` takes precedence on iOS.
|
|
352
355
|
* @platform ios
|
|
353
356
|
*/
|
|
354
357
|
textContentType?: ?TextContentType,
|
|
@@ -1630,16 +1633,20 @@ const ExportedForwardRef: React.AbstractComponent<
|
|
|
1630
1633
|
}
|
|
1631
1634
|
autoComplete={
|
|
1632
1635
|
Platform.OS === 'android'
|
|
1633
|
-
? // $FlowFixMe
|
|
1636
|
+
? // $FlowFixMe[invalid-computed-prop]
|
|
1637
|
+
// $FlowFixMe[prop-missing]
|
|
1634
1638
|
autoCompleteWebToAutoCompleteAndroidMap[autoComplete] ??
|
|
1635
1639
|
autoComplete
|
|
1636
1640
|
: undefined
|
|
1637
1641
|
}
|
|
1638
1642
|
textContentType={
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
+
textContentType != null
|
|
1644
|
+
? textContentType
|
|
1645
|
+
: Platform.OS === 'ios' &&
|
|
1646
|
+
autoComplete &&
|
|
1647
|
+
autoComplete in autoCompleteWebToTextContentTypeMap
|
|
1648
|
+
? // $FlowFixMe[invalid-computed-prop]
|
|
1649
|
+
// $FlowFixMe[prop-missing]
|
|
1643
1650
|
autoCompleteWebToTextContentTypeMap[autoComplete]
|
|
1644
1651
|
: textContentType
|
|
1645
1652
|
}
|
|
@@ -301,9 +301,8 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|
|
301
301
|
this.state.pressability.configure(this._createPressabilityConfig());
|
|
302
302
|
if (
|
|
303
303
|
this.props.disabled !== prevProps.disabled ||
|
|
304
|
-
|
|
305
|
-
flattenStyle(this.props.style)?.opacity
|
|
306
|
-
undefined
|
|
304
|
+
flattenStyle(prevProps.style)?.opacity !==
|
|
305
|
+
flattenStyle(this.props.style)?.opacity
|
|
307
306
|
) {
|
|
308
307
|
this._opacityInactive(250);
|
|
309
308
|
}
|
|
@@ -69,7 +69,7 @@ export interface TouchableWithoutFeedbackProps
|
|
|
69
69
|
* the Z-index of sibling views always takes precedence if a touch hits
|
|
70
70
|
* two overlapping views.
|
|
71
71
|
*/
|
|
72
|
-
hitSlop?: Insets | undefined;
|
|
72
|
+
hitSlop?: null | Insets | number | undefined;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Used to reference react managed views from native code.
|
|
@@ -121,7 +121,7 @@ export interface TouchableWithoutFeedbackProps
|
|
|
121
121
|
* while the scroll view is disabled. Ensure you pass in a constant
|
|
122
122
|
* to reduce memory allocations.
|
|
123
123
|
*/
|
|
124
|
-
pressRetentionOffset?: Insets | undefined;
|
|
124
|
+
pressRetentionOffset?: null | Insets | number | undefined;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Used to locate this view in end-to-end tests.
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
AccessibilityState,
|
|
16
16
|
AccessibilityValue,
|
|
17
17
|
} from '../../Components/View/ViewAccessibility';
|
|
18
|
-
import type {
|
|
18
|
+
import type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType';
|
|
19
19
|
import type {
|
|
20
20
|
BlurEvent,
|
|
21
21
|
FocusEvent,
|
|
@@ -67,7 +67,7 @@ type Props = $ReadOnly<{|
|
|
|
67
67
|
delayPressOut?: ?number,
|
|
68
68
|
disabled?: ?boolean,
|
|
69
69
|
focusable?: ?boolean,
|
|
70
|
-
hitSlop?: ?
|
|
70
|
+
hitSlop?: ?EdgeInsetsOrSizeProp,
|
|
71
71
|
id?: string,
|
|
72
72
|
importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),
|
|
73
73
|
nativeID?: ?string,
|
|
@@ -79,7 +79,7 @@ type Props = $ReadOnly<{|
|
|
|
79
79
|
onPress?: ?(event: PressEvent) => mixed,
|
|
80
80
|
onPressIn?: ?(event: PressEvent) => mixed,
|
|
81
81
|
onPressOut?: ?(event: PressEvent) => mixed,
|
|
82
|
-
pressRetentionOffset?: ?
|
|
82
|
+
pressRetentionOffset?: ?EdgeInsetsOrSizeProp,
|
|
83
83
|
rejectResponderTermination?: ?boolean,
|
|
84
84
|
testID?: ?string,
|
|
85
85
|
touchSoundDisabled?: ?boolean,
|
|
@@ -14,9 +14,9 @@ import type {
|
|
|
14
14
|
VirtualizedListProps,
|
|
15
15
|
} from './VirtualizedList';
|
|
16
16
|
import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
|
|
17
|
-
import {StyleProp} from '../StyleSheet/StyleSheet';
|
|
18
|
-
import {ViewStyle} from '../StyleSheet/StyleSheetTypes';
|
|
19
|
-
import {View} from '../Components/View/View';
|
|
17
|
+
import type {StyleProp} from '../StyleSheet/StyleSheet';
|
|
18
|
+
import type {ViewStyle} from '../StyleSheet/StyleSheetTypes';
|
|
19
|
+
import type {View} from '../Components/View/View';
|
|
20
20
|
|
|
21
21
|
export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
|
|
22
22
|
/**
|
|
@@ -40,10 +40,10 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
|
|
|
40
40
|
| undefined;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* An array (or array-like list) of items to render. Other data types can be
|
|
44
|
+
* used by targetting VirtualizedList directly.
|
|
45
45
|
*/
|
|
46
|
-
data:
|
|
46
|
+
data: ArrayLike<ItemT> | null | undefined;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* A marker property for telling the list to re-render (since it implements PureComponent).
|
|
@@ -30,10 +30,10 @@ const React = require('react');
|
|
|
30
30
|
|
|
31
31
|
type RequiredProps<ItemT> = {|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* An array (or array-like list) of items to render. Other data types can be
|
|
34
|
+
* used by targetting VirtualizedList directly.
|
|
35
35
|
*/
|
|
36
|
-
data: ?$
|
|
36
|
+
data: ?$ArrayLike<ItemT>,
|
|
37
37
|
|};
|
|
38
38
|
type OptionalProps<ItemT> = {|
|
|
39
39
|
/**
|
|
@@ -163,6 +163,11 @@ function numColumnsOrDefault(numColumns: ?number) {
|
|
|
163
163
|
return numColumns ?? 1;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
function isArrayLike(data: mixed): boolean {
|
|
167
|
+
// $FlowExpectedError[incompatible-use]
|
|
168
|
+
return typeof Object(data).length === 'number';
|
|
169
|
+
}
|
|
170
|
+
|
|
166
171
|
type FlatListProps<ItemT> = {|
|
|
167
172
|
...RequiredProps<ItemT>,
|
|
168
173
|
...OptionalProps<ItemT>,
|
|
@@ -497,8 +502,10 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
|
|
|
497
502
|
);
|
|
498
503
|
}
|
|
499
504
|
|
|
500
|
-
|
|
501
|
-
|
|
505
|
+
_getItem = (
|
|
506
|
+
data: $ArrayLike<ItemT>,
|
|
507
|
+
index: number,
|
|
508
|
+
): ?(ItemT | $ReadOnlyArray<ItemT>) => {
|
|
502
509
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
503
510
|
if (numColumns > 1) {
|
|
504
511
|
const ret = [];
|
|
@@ -515,8 +522,14 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
|
|
|
515
522
|
}
|
|
516
523
|
};
|
|
517
524
|
|
|
518
|
-
_getItemCount = (data:
|
|
519
|
-
if
|
|
525
|
+
_getItemCount = (data: ?$ArrayLike<ItemT>): number => {
|
|
526
|
+
// Legacy behavior of FlatList was to forward "undefined" length if invalid
|
|
527
|
+
// data like a non-arraylike object is passed. VirtualizedList would then
|
|
528
|
+
// coerce this, and the math would work out to no-op. For compatibility, if
|
|
529
|
+
// invalid data is passed, we tell VirtualizedList there are zero items
|
|
530
|
+
// available to prevent it from trying to read from the invalid data
|
|
531
|
+
// (without propagating invalidly typed data).
|
|
532
|
+
if (data != null && isArrayLike(data)) {
|
|
520
533
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
521
534
|
return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;
|
|
522
535
|
} else {
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -5,17 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
buildscript {
|
|
9
|
-
dependencies {
|
|
10
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.hasProperty("kotlinVersion") ? rootProject.ext.kotlinVersion : KOTLIN_VERSION}"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
plugins {
|
|
15
9
|
id("com.android.library")
|
|
16
10
|
id("com.facebook.react")
|
|
17
11
|
id("de.undercouch.download")
|
|
18
12
|
id("maven-publish")
|
|
13
|
+
id("org.jetbrains.kotlin.android")
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
import com.facebook.react.tasks.internal.*
|
|
@@ -117,6 +112,10 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
|
|
|
117
112
|
new Pair("../ReactCommon/react/renderer/graphics/platform/cxx/", ""),
|
|
118
113
|
]
|
|
119
114
|
),
|
|
115
|
+
new PrefabPreprocessingEntry(
|
|
116
|
+
"rrc_root",
|
|
117
|
+
new Pair("../ReactCommon/react/renderer/components/root/", "react/renderer/components/root/")
|
|
118
|
+
),
|
|
120
119
|
new PrefabPreprocessingEntry(
|
|
121
120
|
"rrc_view",
|
|
122
121
|
new Pair("../ReactCommon/react/renderer/components/view/", "react/renderer/components/view/")
|
|
@@ -471,6 +470,7 @@ android {
|
|
|
471
470
|
"react_render_core",
|
|
472
471
|
"react_render_graphics",
|
|
473
472
|
"rrc_image",
|
|
473
|
+
"rrc_root",
|
|
474
474
|
"rrc_view",
|
|
475
475
|
"jsi",
|
|
476
476
|
"glog",
|
|
@@ -567,6 +567,9 @@ android {
|
|
|
567
567
|
rrc_image {
|
|
568
568
|
headers(new File(prefabHeadersDir, "rrc_image").absolutePath)
|
|
569
569
|
}
|
|
570
|
+
rrc_root {
|
|
571
|
+
headers(new File(prefabHeadersDir, "rrc_root").absolutePath)
|
|
572
|
+
}
|
|
570
573
|
rrc_view {
|
|
571
574
|
headers(new File(prefabHeadersDir, "rrc_view").absolutePath)
|
|
572
575
|
}
|
|
@@ -668,12 +671,7 @@ react {
|
|
|
668
671
|
// TODO: The library name is chosen for parity with Fabric components & iOS
|
|
669
672
|
// This should be changed to a more generic name, e.g. `ReactCoreSpec`.
|
|
670
673
|
libraryName = "rncore"
|
|
671
|
-
root = file("..")
|
|
672
674
|
jsRootDir = file("../Libraries")
|
|
673
|
-
reactNativeDir = file("$projectDir/..")
|
|
674
|
-
// We search for the codegen in either one of the `node_modules` folder or in the
|
|
675
|
-
// root packages folder (that's for when we build from source without calling `yarn install`).
|
|
676
|
-
codegenDir = file(findNodeModulePath(projectDir, "react-native-codegen") ?: "../packages/react-native-codegen/")
|
|
677
675
|
}
|
|
678
676
|
|
|
679
677
|
apply plugin: "org.jetbrains.kotlin.android"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
VERSION_NAME=0.71.
|
|
1
|
+
VERSION_NAME=0.71.5
|
|
2
2
|
GROUP=com.facebook.react
|
|
3
3
|
|
|
4
4
|
# JVM Versions
|
|
@@ -30,8 +30,5 @@ FOLLY_VERSION=2021.07.22.00
|
|
|
30
30
|
GLOG_VERSION=0.3.5
|
|
31
31
|
LIBEVENT_VERSION=2.1.12
|
|
32
32
|
|
|
33
|
-
# Plugins Versions
|
|
34
|
-
KOTLIN_VERSION=1.6.10
|
|
35
|
-
|
|
36
33
|
android.useAndroidX=true
|
|
37
34
|
android.enableJetifier=true
|
|
@@ -39,15 +39,21 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
|
|
39
39
|
return mJniCallCounter;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
private
|
|
43
|
-
if (mLocalMap != null) {
|
|
44
|
-
return mLocalMap;
|
|
45
|
-
}
|
|
42
|
+
private void ensureKeysAreImported() {
|
|
46
43
|
synchronized (this) {
|
|
47
44
|
if (mKeys == null) {
|
|
48
45
|
mKeys = Assertions.assertNotNull(importKeys());
|
|
49
46
|
mJniCallCounter++;
|
|
50
47
|
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private HashMap<String, Object> getLocalMap() {
|
|
52
|
+
if (mLocalMap != null) {
|
|
53
|
+
return mLocalMap;
|
|
54
|
+
}
|
|
55
|
+
ensureKeysAreImported();
|
|
56
|
+
synchronized (this) {
|
|
51
57
|
if (mLocalMap == null) {
|
|
52
58
|
Object[] values = Assertions.assertNotNull(importValues());
|
|
53
59
|
mJniCallCounter++;
|
|
@@ -69,11 +75,8 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
|
|
69
75
|
if (mLocalTypeMap != null) {
|
|
70
76
|
return mLocalTypeMap;
|
|
71
77
|
}
|
|
78
|
+
ensureKeysAreImported();
|
|
72
79
|
synchronized (this) {
|
|
73
|
-
if (mKeys == null) {
|
|
74
|
-
mKeys = Assertions.assertNotNull(importKeys());
|
|
75
|
-
mJniCallCounter++;
|
|
76
|
-
}
|
|
77
80
|
// check that no other thread has already updated
|
|
78
81
|
if (mLocalTypeMap == null) {
|
|
79
82
|
Object[] types = Assertions.assertNotNull(importTypes());
|
|
@@ -187,48 +190,47 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
|
|
187
190
|
|
|
188
191
|
@Override
|
|
189
192
|
public @NonNull Iterator<Map.Entry<String, Object>> getEntryIterator() {
|
|
190
|
-
|
|
191
|
-
mKeys = Assertions.assertNotNull(importKeys());
|
|
192
|
-
}
|
|
193
|
+
ensureKeysAreImported();
|
|
193
194
|
final String[] iteratorKeys = mKeys;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
int currentIndex = 0;
|
|
195
|
+
synchronized (this) {
|
|
196
|
+
final Object[] iteratorValues = Assertions.assertNotNull(importValues());
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return currentIndex < iteratorKeys.length;
|
|
201
|
-
}
|
|
198
|
+
return new Iterator<Map.Entry<String, Object>>() {
|
|
199
|
+
int currentIndex = 0;
|
|
202
200
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
201
|
+
@Override
|
|
202
|
+
public boolean hasNext() {
|
|
203
|
+
return currentIndex < iteratorKeys.length;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@Override
|
|
207
|
+
public Map.Entry<String, Object> next() {
|
|
208
|
+
final int index = currentIndex++;
|
|
209
|
+
return new Map.Entry<String, Object>() {
|
|
210
|
+
@Override
|
|
211
|
+
public String getKey() {
|
|
212
|
+
return iteratorKeys[index];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@Override
|
|
216
|
+
public Object getValue() {
|
|
217
|
+
return iteratorValues[index];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@Override
|
|
221
|
+
public Object setValue(Object value) {
|
|
222
|
+
throw new UnsupportedOperationException(
|
|
223
|
+
"Can't set a value while iterating over a ReadableNativeMap");
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
225
229
|
}
|
|
226
230
|
|
|
227
231
|
@Override
|
|
228
232
|
public @NonNull ReadableMapKeySetIterator keySetIterator() {
|
|
229
|
-
|
|
230
|
-
mKeys = Assertions.assertNotNull(importKeys());
|
|
231
|
-
}
|
|
233
|
+
ensureKeysAreImported();
|
|
232
234
|
final String[] iteratorKeys = mKeys;
|
|
233
235
|
return new ReadableMapKeySetIterator() {
|
|
234
236
|
int currentIndex = 0;
|
package/build.gradle.kts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
plugins { id("io.github.gradle-nexus.publish-plugin") version "1.1.0" }
|
|
9
|
+
|
|
10
|
+
val reactAndroidProperties = java.util.Properties()
|
|
11
|
+
|
|
12
|
+
File("$rootDir/ReactAndroid/gradle.properties").inputStream().use {
|
|
13
|
+
reactAndroidProperties.load(it)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
version =
|
|
17
|
+
if (project.hasProperty("isNightly") &&
|
|
18
|
+
(project.property("isNightly") as? String).toBoolean()) {
|
|
19
|
+
"${reactAndroidProperties.getProperty("VERSION_NAME")}-SNAPSHOT"
|
|
20
|
+
} else {
|
|
21
|
+
reactAndroidProperties.getProperty("VERSION_NAME")
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
group = "com.facebook.react"
|
|
25
|
+
|
|
26
|
+
val ndkPath by extra(System.getenv("ANDROID_NDK"))
|
|
27
|
+
val ndkVersion by extra(System.getenv("ANDROID_NDK_VERSION"))
|
|
28
|
+
|
|
29
|
+
buildscript {
|
|
30
|
+
repositories {
|
|
31
|
+
google()
|
|
32
|
+
mavenCentral()
|
|
33
|
+
gradlePluginPortal()
|
|
34
|
+
}
|
|
35
|
+
dependencies {
|
|
36
|
+
classpath("com.android.tools.build:gradle:7.3.1")
|
|
37
|
+
classpath("de.undercouch:gradle-download-task:5.0.1")
|
|
38
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
val sonatypeUsername = findProperty("SONATYPE_USERNAME")?.toString()
|
|
43
|
+
val sonatypePassword = findProperty("SONATYPE_PASSWORD")?.toString()
|
|
44
|
+
|
|
45
|
+
nexusPublishing {
|
|
46
|
+
repositories {
|
|
47
|
+
sonatype {
|
|
48
|
+
username.set(sonatypeUsername)
|
|
49
|
+
password.set(sonatypePassword)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
allprojects {
|
|
55
|
+
repositories {
|
|
56
|
+
maven { url = uri("$rootDir/node_modules/jsc-android/dist") }
|
|
57
|
+
maven { url = uri("$rootDir/android") }
|
|
58
|
+
google()
|
|
59
|
+
mavenCentral {
|
|
60
|
+
// We don't want to fetch react-native from Maven Central as there are
|
|
61
|
+
// older versions over there.
|
|
62
|
+
content { excludeGroup("com.facebook.react") }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
tasks.register("cleanAll", Delete::class.java) {
|
|
68
|
+
description = "Remove all the build files and intermediate build outputs"
|
|
69
|
+
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":clean"))
|
|
70
|
+
dependsOn(":ReactAndroid:clean")
|
|
71
|
+
dependsOn(":ReactAndroid:hermes-engine:clean")
|
|
72
|
+
dependsOn(":packages:rn-tester:android:app:clean")
|
|
73
|
+
delete(allprojects.map { it.buildDir })
|
|
74
|
+
delete(rootProject.file("./ReactAndroid/.cxx"))
|
|
75
|
+
delete(rootProject.file("./ReactAndroid/hermes-engine/.cxx"))
|
|
76
|
+
delete(rootProject.file("./sdks/download/"))
|
|
77
|
+
delete(rootProject.file("./sdks/hermes/"))
|
|
78
|
+
delete(rootProject.file("./ReactAndroid/src/main/jni/prebuilt/lib/arm64-v8a/"))
|
|
79
|
+
delete(rootProject.file("./ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/"))
|
|
80
|
+
delete(rootProject.file("./ReactAndroid/src/main/jni/prebuilt/lib/x86/"))
|
|
81
|
+
delete(rootProject.file("./ReactAndroid/src/main/jni/prebuilt/lib/x86_64/"))
|
|
82
|
+
delete(rootProject.file("./packages/react-native-codegen/lib"))
|
|
83
|
+
delete(rootProject.file("./packages/rn-tester/android/app/.cxx"))
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
tasks.register("buildAll") {
|
|
87
|
+
description = "Build and test all the React Native relevant projects."
|
|
88
|
+
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":build"))
|
|
89
|
+
// This builds both the React Native framework for both debug and release
|
|
90
|
+
dependsOn(":ReactAndroid:assemble")
|
|
91
|
+
// This creates all the Maven artifacts and makes them available in the /android folder
|
|
92
|
+
dependsOn(":ReactAndroid:installArchives")
|
|
93
|
+
// This builds RN Tester for Hermes/JSC for debug only
|
|
94
|
+
dependsOn(":packages:rn-tester:android:app:assembleDebug")
|
|
95
|
+
// This compiles the Unit Test sources (without running them as they're partially broken)
|
|
96
|
+
dependsOn(":ReactAndroid:compileDebugUnitTestSources")
|
|
97
|
+
dependsOn(":ReactAndroid:compileReleaseUnitTestSources")
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
tasks.register("downloadAll") {
|
|
101
|
+
description = "Download all the depedencies needed locally so they can be cached on CI."
|
|
102
|
+
dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":dependencies"))
|
|
103
|
+
dependsOn(":ReactAndroid:downloadNdkBuildDependencies")
|
|
104
|
+
dependsOn(":ReactAndroid:dependencies")
|
|
105
|
+
dependsOn(":ReactAndroid:androidDependencies")
|
|
106
|
+
dependsOn(":ReactAndroid:hermes-engine:dependencies")
|
|
107
|
+
dependsOn(":ReactAndroid:hermes-engine:androidDependencies")
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
tasks.register("publishAllInsideNpmPackage") {
|
|
111
|
+
description =
|
|
112
|
+
"Publish all the artifacts to be available inside the NPM package in the `android` folder."
|
|
113
|
+
// Due to size constraints of NPM, we publish only react-native and hermes-engine inside
|
|
114
|
+
// the NPM package.
|
|
115
|
+
dependsOn(":ReactAndroid:installArchives")
|
|
116
|
+
dependsOn(":ReactAndroid:hermes-engine:installArchives")
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
tasks.register("publishAllToMavenTempLocal") {
|
|
120
|
+
description = "Publish all the artifacts to be available inside a Maven Local repository on /tmp."
|
|
121
|
+
dependsOn(":ReactAndroid:publishAllPublicationsToMavenTempLocalRepository")
|
|
122
|
+
// We don't publish the external-artifacts to Maven Local as CircleCI is using it via workspace.
|
|
123
|
+
dependsOn(":ReactAndroid:hermes-engine:publishAllPublicationsToMavenTempLocalRepository")
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
tasks.register("publishAllToSonatype") {
|
|
127
|
+
description = "Publish all the artifacts to Sonatype (Maven Central or Snapshot repository)"
|
|
128
|
+
dependsOn(":ReactAndroid:publishToSonatype")
|
|
129
|
+
dependsOn(":ReactAndroid:external-artifacts:publishToSonatype")
|
|
130
|
+
dependsOn(":ReactAndroid:hermes-engine:publishToSonatype")
|
|
131
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This is causing issue with dependencies task: https://github.com/gradle/gradle/issues/9645#issuecomment-530746758
|
|
2
|
+
# org.gradle.configureondemand=true
|
|
3
|
+
org.gradle.daemon=true
|
|
4
|
+
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
|
|
5
|
+
org.gradle.parallel=true
|
|
6
|
+
|
|
7
|
+
android.useAndroidX=true
|
|
8
|
+
|
|
9
|
+
# Use this property to specify which architecture you want to build.
|
|
10
|
+
# You can also override it from the CLI using
|
|
11
|
+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
|
12
|
+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.5",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"android",
|
|
18
|
+
"build.gradle.kts",
|
|
18
19
|
"cli.js",
|
|
19
20
|
"flow",
|
|
20
21
|
"flow-typed",
|
|
22
|
+
"gradle.properties",
|
|
21
23
|
"index.js",
|
|
22
24
|
"interface.js",
|
|
23
25
|
"jest-preset.js",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"sdks/.hermesversion",
|
|
62
64
|
"sdks/hermes-engine",
|
|
63
65
|
"sdks/hermesc",
|
|
66
|
+
"settings.gradle.kts",
|
|
64
67
|
"template.config.js",
|
|
65
68
|
"template",
|
|
66
69
|
"!template/node_modules",
|
|
@@ -107,9 +110,9 @@
|
|
|
107
110
|
},
|
|
108
111
|
"dependencies": {
|
|
109
112
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
110
|
-
"@react-native-community/cli": "10.
|
|
111
|
-
"@react-native-community/cli-platform-android": "10.
|
|
112
|
-
"@react-native-community/cli-platform-ios": "10.
|
|
113
|
+
"@react-native-community/cli": "10.2.2",
|
|
114
|
+
"@react-native-community/cli-platform-android": "10.2.0",
|
|
115
|
+
"@react-native-community/cli-platform-ios": "10.2.1",
|
|
113
116
|
"@react-native/assets": "1.0.0",
|
|
114
117
|
"@react-native/normalize-color": "2.1.0",
|
|
115
118
|
"@react-native/polyfills": "2.0.0",
|
|
@@ -122,15 +125,15 @@
|
|
|
122
125
|
"jest-environment-node": "^29.2.1",
|
|
123
126
|
"jsc-android": "^250231.0.0",
|
|
124
127
|
"memoize-one": "^5.0.0",
|
|
125
|
-
"metro-react-native-babel-transformer": "0.73.
|
|
126
|
-
"metro-runtime": "0.73.
|
|
127
|
-
"metro-source-map": "0.73.
|
|
128
|
+
"metro-react-native-babel-transformer": "0.73.9",
|
|
129
|
+
"metro-runtime": "0.73.9",
|
|
130
|
+
"metro-source-map": "0.73.9",
|
|
128
131
|
"mkdirp": "^0.5.1",
|
|
129
132
|
"nullthrows": "^1.1.1",
|
|
130
133
|
"pretty-format": "^26.5.2",
|
|
131
134
|
"promise": "^8.3.0",
|
|
132
135
|
"react-devtools-core": "^4.26.1",
|
|
133
|
-
"react-native-gradle-plugin": "^0.71.
|
|
136
|
+
"react-native-gradle-plugin": "^0.71.17",
|
|
134
137
|
"react-refresh": "^0.4.0",
|
|
135
138
|
"react-shallow-renderer": "^16.15.0",
|
|
136
139
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -179,8 +182,8 @@
|
|
|
179
182
|
"jest": "^29.2.1",
|
|
180
183
|
"jest-junit": "^10.0.0",
|
|
181
184
|
"jscodeshift": "^0.13.1",
|
|
182
|
-
"metro-babel-register": "0.73.
|
|
183
|
-
"metro-memory-fs": "0.73.
|
|
185
|
+
"metro-babel-register": "0.73.9",
|
|
186
|
+
"metro-memory-fs": "0.73.9",
|
|
184
187
|
"mkdirp": "^0.5.1",
|
|
185
188
|
"mock-fs": "^5.1.4",
|
|
186
189
|
"prettier": "^2.4.1",
|
package/sdks/.hermesversion
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-
|
|
1
|
+
hermes-2023-03-07-RNv0.71.4-31fdcf738940875c9bacf251e149006cf515d763
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
pluginManagement {
|
|
9
|
+
repositories {
|
|
10
|
+
mavenCentral()
|
|
11
|
+
google()
|
|
12
|
+
gradlePluginPortal()
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
include(":ReactAndroid", ":ReactAndroid:hermes-engine", ":ReactAndroid:external-artifacts")
|
|
17
|
+
|
|
18
|
+
// If the ./packages folder exists, then we're inside the React Native repository.
|
|
19
|
+
// If not, a users is consuming this project for a build from source.
|
|
20
|
+
if (File("${rootDir}/packages").exists()) {
|
|
21
|
+
include(":packages:rn-tester:android:app")
|
|
22
|
+
// Include this to enable codegen Gradle plugin.
|
|
23
|
+
includeBuild("packages/react-native-gradle-plugin/")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
rootProject.name = "react-native-github"
|
|
27
|
+
|
|
28
|
+
plugins { id("com.gradle.enterprise").version("3.7.1") }
|
|
29
|
+
|
|
30
|
+
// If you specify a file inside gradle/gradle-enterprise.gradle.kts
|
|
31
|
+
// you can configure your custom Gradle Enterprise instance
|
|
32
|
+
if (File("./gradle/gradle-enterprise.gradle.kts").exists()) {
|
|
33
|
+
apply(from = "./gradle/gradle-enterprise.gradle.kts")
|
|
34
|
+
}
|
package/template/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
3
|
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
-
ruby
|
|
4
|
+
ruby '>= 2.6.10'
|
|
5
5
|
|
|
6
|
-
gem 'cocoapods', '
|
|
6
|
+
gem 'cocoapods', '>= 1.11.3'
|
package/template/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.71.
|
|
14
|
+
"react-native": "0.71.5"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.20.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"babel-jest": "^29.2.1",
|
|
26
26
|
"eslint": "^8.19.0",
|
|
27
27
|
"jest": "^29.2.1",
|
|
28
|
-
"metro-react-native-babel-preset": "0.73.
|
|
28
|
+
"metro-react-native-babel-preset": "0.73.9",
|
|
29
29
|
"prettier": "^2.4.1",
|
|
30
30
|
"react-test-renderer": "18.2.0",
|
|
31
31
|
"typescript": "4.8.4"
|
package/template/_ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.7.6
|