mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
78
Commits
main
...
0.65-stable
@@ -8,7 +8,6 @@
|
||||
[maven_repositories]
|
||||
central = https://repo1.maven.org/maven2
|
||||
google = https://maven.google.com/
|
||||
jcenter = https://jcenter.bintray.com/
|
||||
|
||||
[alias]
|
||||
rntester = //packages/rn-tester/android/app:app
|
||||
|
||||
@@ -618,7 +618,7 @@ jobs:
|
||||
- ANDROID_HOME: "C:\\Android\\android-sdk"
|
||||
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
|
||||
- ANDROID_BUILD_VERSION: 30
|
||||
- ANDROID_TOOLS_VERSION: 29.0.3
|
||||
- ANDROID_TOOLS_VERSION: 30.0.2
|
||||
- GRADLE_OPTS: -Dorg.gradle.daemon=false
|
||||
- NDK_VERSION: 20.1.5948944
|
||||
steps:
|
||||
|
||||
@@ -13,6 +13,9 @@ indent_size = 2
|
||||
[*.gradle]
|
||||
indent_size = 4
|
||||
|
||||
[*.kts]
|
||||
indent_size = 4
|
||||
|
||||
[BUCK]
|
||||
indent_size = 4
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@ package-lock.json
|
||||
!/packages/rn-tester/Pods/__offline_mirrors__
|
||||
|
||||
# react-native-codegen
|
||||
/React/FBReactNativeSpec/FBReactNativeSpec
|
||||
/packages/react-native-codegen/lib
|
||||
/ReactCommon/react/renderer/components/rncore/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTBlob"
|
||||
|
||||
@@ -105,7 +105,7 @@ export class URLSearchParams {
|
||||
|
||||
function validateBaseUrl(url: string) {
|
||||
// from this MIT-licensed gist: https://gist.github.com/dperini/729294
|
||||
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
|
||||
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)*(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/.test(
|
||||
url,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/**
|
||||
* @generated by scripts/bump-oss-version.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @generated by scripts/bump-oss-version.js
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
exports.version = {
|
||||
major: 0,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
minor: 65,
|
||||
patch: 3,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTImage"
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTLinking"
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTAnimation"
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
#import <React/RCTInvalidating.h>
|
||||
#import <React/RCTURLRequestHandler.h>
|
||||
|
||||
typedef NSURLSessionConfiguration* (^NSURLSessionConfigurationProvider)(void);
|
||||
/**
|
||||
* The block provided via this function will provide the NSURLSessionConfiguration for all HTTP requests made by the app.
|
||||
*/
|
||||
RCT_EXTERN void RCTSetCustomNSURLSessionConfigurationProvider(NSURLSessionConfigurationProvider);
|
||||
/**
|
||||
* This is the default RCTURLRequestHandler implementation for HTTP requests.
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
|
||||
@end
|
||||
|
||||
static NSURLSessionConfigurationProvider urlSessionConfigurationProvider;
|
||||
|
||||
void RCTSetCustomNSURLSessionConfigurationProvider(NSURLSessionConfigurationProvider provider) {
|
||||
urlSessionConfigurationProvider = provider;
|
||||
}
|
||||
|
||||
@implementation RCTHTTPRequestHandler
|
||||
{
|
||||
NSMapTable *_delegates;
|
||||
@@ -75,14 +81,20 @@ RCT_EXPORT_MODULE()
|
||||
NSOperationQueue *callbackQueue = [NSOperationQueue new];
|
||||
callbackQueue.maxConcurrentOperationCount = 1;
|
||||
callbackQueue.underlyingQueue = [[_moduleRegistry moduleForName:"Networking"] methodQueue];
|
||||
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
|
||||
// Set allowsCellularAccess to NO ONLY if key ReactNetworkForceWifiOnly exists AND its value is YES
|
||||
if (useWifiOnly) {
|
||||
configuration.allowsCellularAccess = ![useWifiOnly boolValue];
|
||||
NSURLSessionConfiguration *configuration;
|
||||
if (urlSessionConfigurationProvider) {
|
||||
configuration = urlSessionConfigurationProvider();
|
||||
} else {
|
||||
configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
|
||||
// Set allowsCellularAccess to NO ONLY if key ReactNetworkForceWifiOnly exists AND its value is YES
|
||||
if (useWifiOnly) {
|
||||
configuration.allowsCellularAccess = ![useWifiOnly boolValue];
|
||||
}
|
||||
[configuration setHTTPShouldSetCookies:YES];
|
||||
[configuration setHTTPCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
|
||||
[configuration setHTTPCookieStorage:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
|
||||
}
|
||||
[configuration setHTTPShouldSetCookies:YES];
|
||||
[configuration setHTTPCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
|
||||
[configuration setHTTPCookieStorage:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
|
||||
assert(configuration != nil);
|
||||
_session = [NSURLSession sessionWithConfiguration:configuration
|
||||
delegate:self
|
||||
delegateQueue:callbackQueue];
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTNetwork"
|
||||
|
||||
@@ -15,6 +15,9 @@ import Colors from './Colors';
|
||||
|
||||
const HermesBadge = (): Node => {
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
const version =
|
||||
global.HermesInternal?.getRuntimeProperties?.()['OSS Release Version'] ??
|
||||
'';
|
||||
return global.HermesInternal ? (
|
||||
<View style={styles.badge}>
|
||||
<Text
|
||||
@@ -24,7 +27,7 @@ const HermesBadge = (): Node => {
|
||||
color: isDarkMode ? Colors.light : Colors.dark,
|
||||
},
|
||||
]}>
|
||||
Engine: Hermes
|
||||
{`Engine: Hermes ${version}`}
|
||||
</Text>
|
||||
</View>
|
||||
) : null;
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTPushNotification"
|
||||
|
||||
@@ -14,8 +14,11 @@ import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
|
||||
import {RootTagContext, createRootTag} from './RootTag';
|
||||
import type {RootTag} from './RootTag';
|
||||
import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
|
||||
type Context = {rootTag: number | RootTag, ...};
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
children?: React.Node,
|
||||
fabric?: boolean,
|
||||
@@ -43,6 +46,18 @@ class AppContainer extends React.Component<Props, State> {
|
||||
|
||||
static getDerivedStateFromError: any = undefined;
|
||||
|
||||
static childContextTypes:
|
||||
| any
|
||||
| {|rootTag: React$PropType$Primitive<number>|} = {
|
||||
rootTag: PropTypes.number,
|
||||
};
|
||||
|
||||
getChildContext(): Context {
|
||||
return {
|
||||
rootTag: this.props.rootTag,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
if (__DEV__) {
|
||||
if (!global.__RCTProfileIsProfiling) {
|
||||
|
||||
@@ -13,12 +13,17 @@ import NativeI18nManager from './NativeI18nManager';
|
||||
const i18nConstants: {|
|
||||
doLeftAndRightSwapInRTL: boolean,
|
||||
isRTL: boolean,
|
||||
localeIdentifier?: ?string,
|
||||
|} = getI18nManagerConstants();
|
||||
|
||||
function getI18nManagerConstants() {
|
||||
if (NativeI18nManager) {
|
||||
const {isRTL, doLeftAndRightSwapInRTL} = NativeI18nManager.getConstants();
|
||||
return {isRTL, doLeftAndRightSwapInRTL};
|
||||
const {
|
||||
isRTL,
|
||||
doLeftAndRightSwapInRTL,
|
||||
localeIdentifier,
|
||||
} = NativeI18nManager.getConstants();
|
||||
return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -28,7 +33,11 @@ function getI18nManagerConstants() {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getConstants: (): {|doLeftAndRightSwapInRTL: boolean, isRTL: boolean|} => {
|
||||
getConstants: (): {|
|
||||
doLeftAndRightSwapInRTL: boolean,
|
||||
isRTL: boolean,
|
||||
localeIdentifier: ?string,
|
||||
|} => {
|
||||
return i18nConstants;
|
||||
},
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTSettings"
|
||||
|
||||
@@ -16,6 +16,8 @@ export opaque type NativeColorValue = {
|
||||
dynamic?: {
|
||||
light: ?(ColorValue | ProcessedColorValue),
|
||||
dark: ?(ColorValue | ProcessedColorValue),
|
||||
highContrastLight?: ?(ColorValue | ProcessedColorValue),
|
||||
highContrastDark?: ?(ColorValue | ProcessedColorValue),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -26,12 +28,21 @@ export const PlatformColor = (...names: Array<string>): ColorValue => {
|
||||
export type DynamicColorIOSTuplePrivate = {
|
||||
light: ColorValue,
|
||||
dark: ColorValue,
|
||||
highContrastLight?: ColorValue,
|
||||
highContrastDark?: ColorValue,
|
||||
};
|
||||
|
||||
export const DynamicColorIOSPrivate = (
|
||||
tuple: DynamicColorIOSTuplePrivate,
|
||||
): ColorValue => {
|
||||
return {dynamic: {light: tuple.light, dark: tuple.dark}};
|
||||
return {
|
||||
dynamic: {
|
||||
light: tuple.light,
|
||||
dark: tuple.dark,
|
||||
highContrastLight: tuple.highContrastLight,
|
||||
highContrastDark: tuple.highContrastDark,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export const normalizeColorObject = (
|
||||
@@ -49,6 +60,8 @@ export const normalizeColorObject = (
|
||||
dynamic: {
|
||||
light: normalizeColor(dynamic.light),
|
||||
dark: normalizeColor(dynamic.dark),
|
||||
highContrastLight: normalizeColor(dynamic.highContrastLight),
|
||||
highContrastDark: normalizeColor(dynamic.highContrastDark),
|
||||
},
|
||||
};
|
||||
return dynamicColor;
|
||||
@@ -67,6 +80,8 @@ export const processColorObject = (
|
||||
dynamic: {
|
||||
light: processColor(dynamic.light),
|
||||
dark: processColor(dynamic.dark),
|
||||
highContrastLight: processColor(dynamic.highContrastLight),
|
||||
highContrastDark: processColor(dynamic.highContrastDark),
|
||||
},
|
||||
};
|
||||
return dynamicColor;
|
||||
|
||||
@@ -14,8 +14,15 @@ import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
|
||||
export type DynamicColorIOSTuple = {
|
||||
light: ColorValue,
|
||||
dark: ColorValue,
|
||||
highContrastLight?: ColorValue,
|
||||
highContrastDark?: ColorValue,
|
||||
};
|
||||
|
||||
export const DynamicColorIOS = (tuple: DynamicColorIOSTuple): ColorValue => {
|
||||
return DynamicColorIOSPrivate({light: tuple.light, dark: tuple.dark});
|
||||
return DynamicColorIOSPrivate({
|
||||
light: tuple.light,
|
||||
dark: tuple.dark,
|
||||
highContrastLight: tuple.highContrastLight,
|
||||
highContrastDark: tuple.highContrastDark,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -13,6 +13,8 @@ import type {ColorValue} from './StyleSheet';
|
||||
export type DynamicColorIOSTuple = {
|
||||
light: ColorValue,
|
||||
dark: ColorValue,
|
||||
highContrastLight?: ColorValue,
|
||||
highContrastDark?: ColorValue,
|
||||
};
|
||||
|
||||
export const DynamicColorIOS = (tuple: DynamicColorIOSTuple): ColorValue => {
|
||||
|
||||
@@ -43,6 +43,25 @@ describe('iOS', () => {
|
||||
expect(normalizedColor).toEqual(expectedColor);
|
||||
});
|
||||
|
||||
it('should normalize iOS Dynamic colors with accessible colors', () => {
|
||||
const color = DynamicColorIOS({
|
||||
light: 'black',
|
||||
dark: 'white',
|
||||
highContrastLight: 'red',
|
||||
highContrastDark: 'blue',
|
||||
});
|
||||
const normalizedColor = normalizeColor(color);
|
||||
const expectedColor = {
|
||||
dynamic: {
|
||||
light: 'black',
|
||||
dark: 'white',
|
||||
highContrastLight: 'red',
|
||||
highContrastDark: 'blue',
|
||||
},
|
||||
};
|
||||
expect(normalizedColor).toEqual(expectedColor);
|
||||
});
|
||||
|
||||
it('should normalize iOS Dynamic colors with PlatformColor colors', () => {
|
||||
const color = DynamicColorIOS({
|
||||
light: PlatformColor('systemBlackColor'),
|
||||
|
||||
@@ -34,6 +34,8 @@ const Text: React.AbstractComponent<
|
||||
ellipsizeMode,
|
||||
onLongPress,
|
||||
onPress,
|
||||
onPressIn,
|
||||
onPressOut,
|
||||
onResponderGrant,
|
||||
onResponderMove,
|
||||
onResponderRelease,
|
||||
@@ -64,9 +66,11 @@ const Text: React.AbstractComponent<
|
||||
onPress,
|
||||
onPressIn(event) {
|
||||
setHighlighted(!suppressHighlighting);
|
||||
onPressIn?.(event);
|
||||
},
|
||||
onPressOut(event) {
|
||||
setHighlighted(false);
|
||||
onPressOut?.(event);
|
||||
},
|
||||
onResponderTerminationRequest_DEPRECATED: onResponderTerminationRequest,
|
||||
onStartShouldSetResponder_DEPRECATED: onStartShouldSetResponder,
|
||||
@@ -78,6 +82,8 @@ const Text: React.AbstractComponent<
|
||||
pressRetentionOffset,
|
||||
onLongPress,
|
||||
onPress,
|
||||
onPressIn,
|
||||
onPressOut,
|
||||
onResponderTerminationRequest,
|
||||
onStartShouldSetResponder,
|
||||
suppressHighlighting,
|
||||
|
||||
@@ -122,6 +122,8 @@ export type TextProps = $ReadOnly<{|
|
||||
* See https://reactnative.dev/docs/text.html#onpress
|
||||
*/
|
||||
onPress?: ?(event: PressEvent) => mixed,
|
||||
onPressIn?: ?(event: PressEvent) => mixed,
|
||||
onPressOut?: ?(event: PressEvent) => mixed,
|
||||
onResponderGrant?: ?(event: PressEvent) => void,
|
||||
onResponderMove?: ?(event: PressEvent) => void,
|
||||
onResponderRelease?: ?(event: PressEvent) => void,
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "RCTTypeSafety"
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTVibration"
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
header_subspecs = {
|
||||
@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
|
||||
s.header_dir = "React"
|
||||
s.framework = "JavaScriptCore"
|
||||
s.library = "stdc++"
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"", "DEFINES_MODULE" => "YES" }
|
||||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"", "DEFINES_MODULE" => "YES" }
|
||||
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
|
||||
s.default_subspec = "Default"
|
||||
|
||||
|
||||
+20
-4
@@ -879,13 +879,29 @@ static NSString *RCTSemanticColorNames()
|
||||
UIColor *lightColor = [RCTConvert UIColor:light];
|
||||
id dark = [appearances objectForKey:@"dark"];
|
||||
UIColor *darkColor = [RCTConvert UIColor:dark];
|
||||
id highContrastLight = [appearances objectForKey:@"highContrastLight"];
|
||||
UIColor *highContrastLightColor = [RCTConvert UIColor:highContrastLight];
|
||||
id highContrastDark = [appearances objectForKey:@"highContrastDark"];
|
||||
UIColor *highContrastDarkColor = [RCTConvert UIColor:highContrastDark];
|
||||
if (lightColor != nil && darkColor != nil) {
|
||||
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
|
||||
if (@available(iOS 13.0, *)) {
|
||||
UIColor *color =
|
||||
[UIColor colorWithDynamicProvider:^UIColor *_Nonnull(UITraitCollection *_Nonnull collection) {
|
||||
return collection.userInterfaceStyle == UIUserInterfaceStyleDark ? darkColor : lightColor;
|
||||
}];
|
||||
UIColor *color = [UIColor colorWithDynamicProvider:^UIColor *_Nonnull(
|
||||
UITraitCollection *_Nonnull collection) {
|
||||
if (collection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastDarkColor != nil) {
|
||||
return highContrastDarkColor;
|
||||
} else {
|
||||
return darkColor;
|
||||
}
|
||||
} else {
|
||||
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastLightColor != nil) {
|
||||
return highContrastLightColor;
|
||||
} else {
|
||||
return lightColor;
|
||||
}
|
||||
}
|
||||
}];
|
||||
return color;
|
||||
} else {
|
||||
#endif
|
||||
|
||||
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^(void){
|
||||
__rnVersion = @{
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(0),
|
||||
RCTVersionPatch: @(0),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
RCTVersionMajor: @(0),
|
||||
RCTVersionMinor: @(65),
|
||||
RCTVersionPatch: @(3),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
return __rnVersion;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,9 @@ RCT_EXPORT_MODULE(Appearance)
|
||||
|
||||
RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, getColorScheme)
|
||||
{
|
||||
_currentColorScheme = RCTColorSchemePreference(nil);
|
||||
if (_currentColorScheme == nil) {
|
||||
_currentColorScheme = RCTColorSchemePreference(nil);
|
||||
}
|
||||
return _currentColorScheme;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-CoreModules"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#import <reactperflogger/BridgeNativeModulePerfLogger.h>
|
||||
|
||||
#ifndef RCT_USE_HERMES
|
||||
#if __has_include(<hermes/hermes.h>)
|
||||
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
|
||||
#define RCT_USE_HERMES 1
|
||||
#else
|
||||
#define RCT_USE_HERMES 0
|
||||
@@ -48,7 +48,7 @@
|
||||
#endif
|
||||
|
||||
#if RCT_USE_HERMES
|
||||
#import <reacthermes/HermesExecutorFactory.h">
|
||||
#import <reacthermes/HermesExecutorFactory.h>
|
||||
#else
|
||||
#import "JSCExecutorFactory.h"
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "FBReactNativeSpec"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ end
|
||||
|
||||
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
|
||||
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -82,13 +82,13 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
|
||||
/**
|
||||
* Border colors (actually retained).
|
||||
*/
|
||||
@property (nonatomic, assign) CGColorRef borderTopColor;
|
||||
@property (nonatomic, assign) CGColorRef borderRightColor;
|
||||
@property (nonatomic, assign) CGColorRef borderBottomColor;
|
||||
@property (nonatomic, assign) CGColorRef borderLeftColor;
|
||||
@property (nonatomic, assign) CGColorRef borderStartColor;
|
||||
@property (nonatomic, assign) CGColorRef borderEndColor;
|
||||
@property (nonatomic, assign) CGColorRef borderColor;
|
||||
@property (nonatomic, strong) UIColor *borderTopColor;
|
||||
@property (nonatomic, strong) UIColor *borderRightColor;
|
||||
@property (nonatomic, strong) UIColor *borderBottomColor;
|
||||
@property (nonatomic, strong) UIColor *borderLeftColor;
|
||||
@property (nonatomic, strong) UIColor *borderStartColor;
|
||||
@property (nonatomic, strong) UIColor *borderEndColor;
|
||||
@property (nonatomic, strong) UIColor *borderColor;
|
||||
|
||||
/**
|
||||
* Border widths.
|
||||
|
||||
+30
-42
@@ -729,28 +729,28 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x)
|
||||
const BOOL isRTL = _reactLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft;
|
||||
|
||||
if ([[RCTI18nUtil sharedInstance] doLeftAndRightSwapInRTL]) {
|
||||
const CGColorRef borderStartColor = _borderStartColor ?: _borderLeftColor;
|
||||
const CGColorRef borderEndColor = _borderEndColor ?: _borderRightColor;
|
||||
UIColor *borderStartColor = _borderStartColor ?: _borderLeftColor;
|
||||
UIColor *borderEndColor = _borderEndColor ?: _borderRightColor;
|
||||
|
||||
const CGColorRef directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor;
|
||||
const CGColorRef directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor;
|
||||
UIColor *directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor;
|
||||
UIColor *directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor;
|
||||
|
||||
return (RCTBorderColors){
|
||||
_borderTopColor ?: _borderColor,
|
||||
directionAwareBorderLeftColor ?: _borderColor,
|
||||
_borderBottomColor ?: _borderColor,
|
||||
directionAwareBorderRightColor ?: _borderColor,
|
||||
(_borderTopColor ?: _borderColor).CGColor,
|
||||
(directionAwareBorderLeftColor ?: _borderColor).CGColor,
|
||||
(_borderBottomColor ?: _borderColor).CGColor,
|
||||
(directionAwareBorderRightColor ?: _borderColor).CGColor,
|
||||
};
|
||||
}
|
||||
|
||||
const CGColorRef directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor;
|
||||
const CGColorRef directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor;
|
||||
UIColor *directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor;
|
||||
UIColor *directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor;
|
||||
|
||||
return (RCTBorderColors){
|
||||
_borderTopColor ?: _borderColor,
|
||||
directionAwareBorderLeftColor ?: _borderLeftColor ?: _borderColor,
|
||||
_borderBottomColor ?: _borderColor,
|
||||
directionAwareBorderRightColor ?: _borderRightColor ?: _borderColor,
|
||||
(_borderTopColor ?: _borderColor).CGColor,
|
||||
(directionAwareBorderLeftColor ?: _borderLeftColor ?: _borderColor).CGColor,
|
||||
(_borderBottomColor ?: _borderColor).CGColor,
|
||||
(directionAwareBorderRightColor ?: _borderRightColor ?: _borderColor).CGColor,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -902,19 +902,18 @@ static void RCTUpdateShadowPathForView(RCTView *view)
|
||||
|
||||
#pragma mark Border Color
|
||||
|
||||
#define setBorderColor(side) \
|
||||
-(void)setBorder##side##Color : (CGColorRef)color \
|
||||
{ \
|
||||
if (CGColorEqualToColor(_border##side##Color, color)) { \
|
||||
return; \
|
||||
} \
|
||||
CGColorRelease(_border##side##Color); \
|
||||
_border##side##Color = CGColorRetain(color); \
|
||||
[self.layer setNeedsDisplay]; \
|
||||
#define setBorderColor(side) \
|
||||
-(void)setBorder##side##Color : (UIColor *)color \
|
||||
{ \
|
||||
if ([_border##side##Color isEqual:color]) { \
|
||||
return; \
|
||||
} \
|
||||
_border##side##Color = color; \
|
||||
[self.layer setNeedsDisplay]; \
|
||||
}
|
||||
|
||||
setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom) setBorderColor(Left)
|
||||
setBorderColor(Start) setBorderColor(End)
|
||||
setBorderColor(Start) setBorderColor(End)
|
||||
|
||||
#pragma mark - Border Width
|
||||
|
||||
@@ -928,8 +927,8 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
||||
[self.layer setNeedsDisplay]; \
|
||||
}
|
||||
|
||||
setBorderWidth() setBorderWidth(Top) setBorderWidth(Right) setBorderWidth(Bottom) setBorderWidth(Left)
|
||||
setBorderWidth(Start) setBorderWidth(End)
|
||||
setBorderWidth() setBorderWidth(Top) setBorderWidth(Right) setBorderWidth(Bottom) setBorderWidth(Left)
|
||||
setBorderWidth(Start) setBorderWidth(End)
|
||||
|
||||
#pragma mark - Border Radius
|
||||
|
||||
@@ -943,9 +942,9 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
||||
[self.layer setNeedsDisplay]; \
|
||||
}
|
||||
|
||||
setBorderRadius() setBorderRadius(TopLeft) setBorderRadius(TopRight) setBorderRadius(TopStart)
|
||||
setBorderRadius(TopEnd) setBorderRadius(BottomLeft) setBorderRadius(BottomRight)
|
||||
setBorderRadius(BottomStart) setBorderRadius(BottomEnd)
|
||||
setBorderRadius() setBorderRadius(TopLeft) setBorderRadius(TopRight) setBorderRadius(TopStart)
|
||||
setBorderRadius(TopEnd) setBorderRadius(BottomLeft) setBorderRadius(BottomRight)
|
||||
setBorderRadius(BottomStart) setBorderRadius(BottomEnd)
|
||||
|
||||
#pragma mark - Border Style
|
||||
|
||||
@@ -959,17 +958,6 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
||||
[self.layer setNeedsDisplay]; \
|
||||
}
|
||||
|
||||
setBorderStyle()
|
||||
setBorderStyle()
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
CGColorRelease(_borderColor);
|
||||
CGColorRelease(_borderTopColor);
|
||||
CGColorRelease(_borderRightColor);
|
||||
CGColorRelease(_borderBottomColor);
|
||||
CGColorRelease(_borderLeftColor);
|
||||
CGColorRelease(_borderStartColor);
|
||||
CGColorRelease(_borderEndColor);
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
||||
@@ -261,7 +261,7 @@ RCT_CUSTOM_VIEW_PROPERTY(borderRadius, CGFloat, RCTView)
|
||||
RCT_CUSTOM_VIEW_PROPERTY(borderColor, CGColor, RCTView)
|
||||
{
|
||||
if ([view respondsToSelector:@selector(setBorderColor:)]) {
|
||||
view.borderColor = json ? [RCTConvert CGColor:json] : defaultView.borderColor;
|
||||
view.borderColor = json ? [RCTConvert UIColor:json] : defaultView.borderColor;
|
||||
} else {
|
||||
view.layer.borderColor = json ? [RCTConvert CGColor:json] : defaultView.layer.borderColor;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ RCT_CUSTOM_VIEW_PROPERTY(hitSlop, UIEdgeInsets, RCTView)
|
||||
RCT_CUSTOM_VIEW_PROPERTY(border##SIDE##Color, UIColor, RCTView) \
|
||||
{ \
|
||||
if ([view respondsToSelector:@selector(setBorder##SIDE##Color:)]) { \
|
||||
view.border##SIDE##Color = json ? [RCTConvert CGColor:json] : defaultView.border##SIDE##Color; \
|
||||
view.border##SIDE##Color = json ? [RCTConvert UIColor:json] : defaultView.border##SIDE##Color; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
// LICENSE file in the root directory of this source tree.
|
||||
//
|
||||
|
||||
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2020.01.13.00 $(SRCROOT)/../third-party/glog-0.3.5/src
|
||||
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2021.04.26.00 $(SRCROOT)/../third-party/glog-0.3.5/src
|
||||
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
|
||||
|
||||
+58
-13
@@ -8,7 +8,7 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("com.facebook.react.codegen")
|
||||
id("maven")
|
||||
id("maven-publish")
|
||||
id("de.undercouch.download")
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import de.undercouch.gradle.tasks.download.Download
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
def AAR_OUTPUT_URL = "file://${projectDir}/../android"
|
||||
// We download various C++ open-source dependencies into downloads.
|
||||
// We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk.
|
||||
// After that we build native code from src/main/jni with module path pointing at third-party-ndk.
|
||||
@@ -377,13 +378,13 @@ task extractJNIFiles {
|
||||
}
|
||||
}
|
||||
|
||||
task installArchives {
|
||||
dependsOn("publishReleasePublicationToNpmRepository")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
ndkVersion ANDROID_NDK_VERSION
|
||||
compileOptions {
|
||||
sourceCompatibility(JavaVersion.VERSION_1_8)
|
||||
targetCompatibility(JavaVersion.VERSION_1_8)
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion(21)
|
||||
@@ -415,11 +416,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
compileTask ->
|
||||
compileTask.dependsOn(packageReactNdkLibs)
|
||||
}
|
||||
|
||||
preBuild.dependsOn(packageReactNdkLibs)
|
||||
clean.dependsOn(cleanReactNdkLib)
|
||||
|
||||
lintOptions {
|
||||
@@ -440,7 +437,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
api("com.facebook.infer.annotation:infer-annotation:0.11.2")
|
||||
api("com.facebook.yoga:proguard-annotations:1.17.0")
|
||||
api("com.facebook.yoga:proguard-annotations:1.19.0")
|
||||
api("javax.inject:javax.inject:1")
|
||||
api("androidx.appcompat:appcompat:1.0.2")
|
||||
api("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
||||
@@ -472,8 +469,6 @@ dependencies {
|
||||
androidTestImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
|
||||
}
|
||||
|
||||
apply(from: "release.gradle")
|
||||
|
||||
react {
|
||||
// TODO: The library name is chosen for parity with Fabric components & iOS
|
||||
// This should be changed to a more generic name, e.g. `ReactCoreSpec`.
|
||||
@@ -482,3 +477,53 @@ react {
|
||||
reactNativeRootDir = file("$projectDir/..")
|
||||
useJavaGenerator = System.getenv("USE_CODEGEN_JAVAPOET") ?: false
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
publishing {
|
||||
publications {
|
||||
release(MavenPublication) {
|
||||
// Applies the component for the release build variant.
|
||||
from components.release
|
||||
|
||||
// You can then customize attributes of the publication as shown below.
|
||||
artifactId = POM_ARTIFACT_ID
|
||||
groupId = GROUP
|
||||
version = VERSION_NAME
|
||||
|
||||
pom {
|
||||
name = POM_NAME
|
||||
description = "A framework for building native apps with React"
|
||||
url = "https://github.com/facebook/react-native"
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id = "facebook"
|
||||
name = "Facebook"
|
||||
}
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = "MIT License"
|
||||
url = "https://github.com/facebook/react-native/blob/master/LICENSE"
|
||||
distribution = "repo"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url = "https://github.com/facebook/react-native.git"
|
||||
connection = "scm:git:https://github.com/facebook/react-native.git"
|
||||
developerConnection = "scm:git:git@github.com:facebook/react-native.git"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "npm"
|
||||
url = AAR_OUTPUT_URL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.65.3
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
@@ -11,9 +11,9 @@ ROBOLECTRIC_VERSION=4.4
|
||||
JUNIT_VERSION=4.12
|
||||
|
||||
ANDROIDX_TEST_VERSION=1.1.0
|
||||
FRESCO_VERSION=2.3.0
|
||||
OKHTTP_VERSION=4.9.0
|
||||
SO_LOADER_VERSION=0.9.0
|
||||
FRESCO_VERSION=2.5.0
|
||||
OKHTTP_VERSION=4.9.1
|
||||
SO_LOADER_VERSION=0.10.1
|
||||
|
||||
BOOST_VERSION=1_63_0
|
||||
DOUBLE_CONVERSION_VERSION=1.1.6
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
apply(plugin: "maven")
|
||||
apply(plugin: "signing")
|
||||
|
||||
ext {
|
||||
AAR_OUTPUT_URL = "file://${projectDir}/../android"
|
||||
}
|
||||
|
||||
// Gradle tasks for publishing to maven
|
||||
// 1) To install in local maven repo use :installArchives task
|
||||
// 2) To upload artifact to maven central use: :uploadArchives (you'd need to have the permission to do that)
|
||||
|
||||
def isReleaseBuild() {
|
||||
return VERSION_NAME.contains("SNAPSHOT") == false
|
||||
}
|
||||
|
||||
def configureReactNativePom(def pom) {
|
||||
pom.project {
|
||||
name(POM_NAME)
|
||||
artifactId(POM_ARTIFACT_ID)
|
||||
packaging(POM_PACKAGING)
|
||||
description("A framework for building native apps with React")
|
||||
url("https://github.com/facebook/react-native")
|
||||
|
||||
scm {
|
||||
url("https://github.com/facebook/react-native.git")
|
||||
connection("scm:git:https://github.com/facebook/react-native.git")
|
||||
developerConnection("scm:git:git@github.com:facebook/react-native.git")
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name("MIT License")
|
||||
url("https://github.com/facebook/react-native/blob/master/LICENSE")
|
||||
distribution("repo")
|
||||
}
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id("facebook")
|
||||
name("Facebook")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption("Xdoclint:none", "-quiet")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate { project ->
|
||||
android.libraryVariants.all { variant ->
|
||||
def name = variant.name.capitalize()
|
||||
task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
|
||||
from(variant.javaCompileProvider.get().destinationDir)
|
||||
}
|
||||
}
|
||||
|
||||
version = VERSION_NAME
|
||||
group = GROUP
|
||||
|
||||
signing {
|
||||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
|
||||
sign(configurations.archives)
|
||||
}
|
||||
|
||||
task installArchives(type: Upload) {
|
||||
configuration = configurations.archives
|
||||
repositories.mavenDeployer {
|
||||
// Deploy to react-native/android, ready to publish to npm
|
||||
repository(url: AAR_OUTPUT_URL)
|
||||
|
||||
configureReactNativePom(pom)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,8 @@ rn_prebuilt_jar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "annotations-binary.jar",
|
||||
sha1 = "95ff77fd4870136a0454dd7ccad8813db87bd9ab",
|
||||
url = "https://jcenter.bintray.com/com/facebook/yoga/proguard-annotations/1.17.0/proguard-annotations-1.17.0.jar",
|
||||
sha1 = "fcbbb39052e6490eaaf6a6959c49c3a4fbe87c63",
|
||||
url = "mvn:com.facebook.yoga:proguard-annotations:jar:1.19.0",
|
||||
)
|
||||
|
||||
rn_android_library(
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
package com.facebook.react;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -120,6 +121,12 @@ public abstract class ReactActivity extends AppCompatActivity
|
||||
mDelegate.onWindowFocusChanged(hasFocus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
mDelegate.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
protected final ReactNativeHost getReactNativeHost() {
|
||||
return mDelegate.getReactNativeHost();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
@@ -154,6 +155,12 @@ public class ReactActivityDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
if (getReactNativeHost().hasInstance()) {
|
||||
getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
public void requestPermissions(
|
||||
String[] permissions, int requestCode, PermissionListener listener) {
|
||||
|
||||
+10
-1
@@ -7,6 +7,7 @@
|
||||
|
||||
package com.facebook.react.modules.appearance;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -74,7 +75,15 @@ public class AppearanceModule extends NativeAppearanceSpec {
|
||||
|
||||
@Override
|
||||
public String getColorScheme() {
|
||||
mColorScheme = colorSchemeForCurrentConfiguration(getReactApplicationContext());
|
||||
// Attempt to use the Activity context first in order to get the most up to date
|
||||
// scheme. This covers the scenario when AppCompatDelegate.setDefaultNightMode()
|
||||
// is called directly (which can occur in Brownfield apps for example).
|
||||
Activity activity = getCurrentActivity();
|
||||
|
||||
mColorScheme =
|
||||
colorSchemeForCurrentConfiguration(
|
||||
activity != null ? activity : getReactApplicationContext());
|
||||
|
||||
return mColorScheme;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,15 @@ import com.facebook.react.bridge.ReactContext;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public final class BlobProvider extends ContentProvider {
|
||||
|
||||
private static final int PIPE_CAPACITY = 65536;
|
||||
|
||||
private ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
@Override
|
||||
public boolean onCreate() {
|
||||
return true;
|
||||
@@ -72,7 +78,7 @@ public final class BlobProvider extends ContentProvider {
|
||||
throw new RuntimeException("No blob module associated with BlobProvider");
|
||||
}
|
||||
|
||||
byte[] data = blobModule.resolve(uri);
|
||||
final byte[] data = blobModule.resolve(uri);
|
||||
if (data == null) {
|
||||
throw new FileNotFoundException("Cannot open " + uri.toString() + ", blob not found.");
|
||||
}
|
||||
@@ -84,12 +90,34 @@ public final class BlobProvider extends ContentProvider {
|
||||
return null;
|
||||
}
|
||||
ParcelFileDescriptor readSide = pipe[0];
|
||||
ParcelFileDescriptor writeSide = pipe[1];
|
||||
final ParcelFileDescriptor writeSide = pipe[1];
|
||||
|
||||
try (OutputStream outputStream = new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
|
||||
outputStream.write(data);
|
||||
} catch (IOException exception) {
|
||||
return null;
|
||||
if (data.length <= PIPE_CAPACITY) {
|
||||
// If the blob length is less than or equal to pipe capacity (64 KB),
|
||||
// we can write the data synchronously to the pipe buffer.
|
||||
try (OutputStream outputStream = new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
|
||||
outputStream.write(data);
|
||||
} catch (IOException exception) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
// For blobs larger than 64 KB, a synchronous write would fill up the whole buffer
|
||||
// and block forever, because there are no readers to empty the buffer.
|
||||
// Writing from a separate thread allows us to return the read side descriptor
|
||||
// immediately so that both writer and reader can work concurrently.
|
||||
// Reading from the pipe empties the buffer and allows the next chunks to be written.
|
||||
Runnable writer =
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
try (OutputStream outputStream =
|
||||
new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
|
||||
outputStream.write(data);
|
||||
} catch (IOException exception) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
};
|
||||
executor.submit(writer);
|
||||
}
|
||||
|
||||
return readSide;
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
public class ReactNativeVersion {
|
||||
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
|
||||
"major", 0,
|
||||
"minor", 0,
|
||||
"patch", 0,
|
||||
"minor", 65,
|
||||
"patch", 3,
|
||||
"prerelease", null);
|
||||
}
|
||||
|
||||
@@ -82,9 +82,18 @@ public class UIManagerHelper {
|
||||
}
|
||||
}
|
||||
CatalystInstance catalystInstance = context.getCatalystInstance();
|
||||
return uiManagerType == FABRIC
|
||||
? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
|
||||
: catalystInstance.getNativeModule(UIManagerModule.class);
|
||||
try {
|
||||
return uiManagerType == FABRIC
|
||||
? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
|
||||
: catalystInstance.getNativeModule(UIManagerModule.class);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
// TODO T67518514 Clean this up once we migrate everything over to bridgeless mode
|
||||
ReactSoftException.logSoftException(
|
||||
"UIManagerHelper",
|
||||
new ReactNoCrashSoftException(
|
||||
"Cannot get UIManager for UIManagerType: " + uiManagerType));
|
||||
return catalystInstance.getNativeModule(UIManagerModule.class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+16
-1
@@ -325,6 +325,21 @@ import java.util.Map;
|
||||
}
|
||||
}
|
||||
|
||||
private static class BoxedColorPropSetter extends PropSetter {
|
||||
|
||||
public BoxedColorPropSetter(ReactProp prop, Method setter) {
|
||||
super(prop, "mixed", setter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nullable Object getValueOrDefault(Object value, Context context) {
|
||||
if (value != null) {
|
||||
return ColorPropConverter.getColor(value, context);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/*package*/ static Map<String, String> getNativePropsForView(
|
||||
Class<? extends ViewManager> viewManagerTopClass,
|
||||
Class<? extends ReactShadowNode> shadowNodeTopClass) {
|
||||
@@ -418,7 +433,7 @@ import java.util.Map;
|
||||
return new BoxedBooleanPropSetter(annotation, method);
|
||||
} else if (propTypeClass == Integer.class) {
|
||||
if ("Color".equals(annotation.customType())) {
|
||||
return new ColorPropSetter(annotation, method);
|
||||
return new BoxedColorPropSetter(annotation, method);
|
||||
}
|
||||
return new BoxedIntPropSetter(annotation, method);
|
||||
} else if (propTypeClass == ReadableArray.class) {
|
||||
|
||||
@@ -9,13 +9,16 @@ package com.facebook.react.views.text;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ReactTypefaceUtils {
|
||||
private static final String TAG = "ReactTypefaceUtils";
|
||||
public static final int UNSET = -1;
|
||||
|
||||
public static int parseFontWeight(@Nullable String fontWeightString) {
|
||||
@@ -23,8 +26,8 @@ public class ReactTypefaceUtils {
|
||||
fontWeightString != null ? parseNumericFontWeight(fontWeightString) : UNSET;
|
||||
int fontWeight = fontWeightNumeric != UNSET ? fontWeightNumeric : Typeface.NORMAL;
|
||||
|
||||
if (fontWeight == 700 || "bold".equals(fontWeightString)) fontWeight = Typeface.BOLD;
|
||||
else if (fontWeight == 400 || "normal".equals(fontWeightString)) fontWeight = Typeface.NORMAL;
|
||||
if ("bold".equals(fontWeightString)) fontWeight = Typeface.BOLD;
|
||||
else if ("normal".equals(fontWeightString)) fontWeight = Typeface.NORMAL;
|
||||
|
||||
return fontWeight;
|
||||
}
|
||||
@@ -81,34 +84,50 @@ public class ReactTypefaceUtils {
|
||||
AssetManager assetManager) {
|
||||
int oldStyle;
|
||||
if (typeface == null) {
|
||||
oldStyle = 0;
|
||||
oldStyle = Typeface.NORMAL;
|
||||
} else {
|
||||
oldStyle = typeface.getStyle();
|
||||
}
|
||||
|
||||
int want = 0;
|
||||
if ((weight == Typeface.BOLD)
|
||||
|| ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
|
||||
want |= Typeface.BOLD;
|
||||
int newStyle = oldStyle;
|
||||
boolean italic = false;
|
||||
if (weight == UNSET) weight = Typeface.NORMAL;
|
||||
if (style == Typeface.ITALIC) italic = true;
|
||||
boolean UNDER_SDK_28 = Build.VERSION.SDK_INT < Build.VERSION_CODES.P;
|
||||
boolean applyNumericValues = !(weight < (Typeface.BOLD_ITALIC + 1) || family != null);
|
||||
boolean numericBold = UNDER_SDK_28 && weight > 699 && applyNumericValues;
|
||||
boolean numericNormal = UNDER_SDK_28 && weight < 700 && applyNumericValues;
|
||||
if (weight == Typeface.BOLD) {
|
||||
newStyle = (newStyle == Typeface.ITALIC) ? Typeface.BOLD_ITALIC : Typeface.BOLD;
|
||||
typeface = Typeface.create(typeface, newStyle);
|
||||
}
|
||||
|
||||
if ((style == Typeface.ITALIC)
|
||||
|| ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
|
||||
want |= Typeface.ITALIC;
|
||||
if (weight == Typeface.NORMAL) {
|
||||
typeface = Typeface.create(typeface, Typeface.NORMAL);
|
||||
newStyle = Typeface.NORMAL;
|
||||
}
|
||||
if (style == Typeface.ITALIC) {
|
||||
newStyle = (newStyle == Typeface.BOLD) ? Typeface.BOLD_ITALIC : Typeface.ITALIC;
|
||||
typeface = Typeface.create(typeface, newStyle);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1 && weight > Typeface.BOLD_ITALIC) {
|
||||
typeface = Typeface.create(typeface, weight, italic);
|
||||
}
|
||||
if (family != null && UNDER_SDK_28 && weight > Typeface.BOLD_ITALIC) {
|
||||
FLog.d(
|
||||
TAG,
|
||||
"Support for numeric font weight numeric values with custom fonts under Android API 28 Pie is not yet supported in ReactNative.");
|
||||
}
|
||||
|
||||
if (family != null) {
|
||||
typeface = ReactFontManager.getInstance().getTypeface(family, want, weight, assetManager);
|
||||
} else if (typeface != null) {
|
||||
// TODO(t9055065): Fix custom fonts getting applied to text children with different style
|
||||
typeface = Typeface.create(typeface, want);
|
||||
typeface = ReactFontManager.getInstance().getTypeface(family, newStyle, weight, assetManager);
|
||||
}
|
||||
|
||||
if (typeface != null) {
|
||||
return typeface;
|
||||
} else {
|
||||
return Typeface.defaultFromStyle(want);
|
||||
if (numericBold || numericNormal) {
|
||||
newStyle = numericBold ? Typeface.BOLD : Typeface.NORMAL;
|
||||
typeface = Typeface.create(typeface, newStyle);
|
||||
FLog.d(
|
||||
TAG,
|
||||
"Support for numeric font weight numeric values available only from Android API 28 Pie. Android device lower then API 28 will use normal or bold.");
|
||||
}
|
||||
return typeface;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,8 +9,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "fresco-binary-aar",
|
||||
sha1 = "fbc98413bb32eefe882a07cc556c7a1224dc9f24",
|
||||
url = "mvn:com.facebook.fresco:fresco:aar:2.3.0",
|
||||
sha1 = "b768459446d166d148aaf3b8edcdcecd59381190",
|
||||
url = "mvn:com.facebook.fresco:fresco:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -21,8 +21,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "drawee-binary-aar",
|
||||
sha1 = "1cff917b6f19efe7a21ca542c8b8bed18d0d9779",
|
||||
url = "mvn:com.facebook.fresco:drawee:aar:2.3.0",
|
||||
sha1 = "06971aca0134eafa61c1b81714c0954cb4eb4e10",
|
||||
url = "mvn:com.facebook.fresco:drawee:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_library(
|
||||
@@ -51,8 +51,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "imagepipeline-base-aar",
|
||||
sha1 = "ed3c290961f4c20fffa0ce35c098714c1934523d",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-base:aar:2.3.0",
|
||||
sha1 = "6839693f5d3b6697cfabbf159d004dae2f465126",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-base:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -63,8 +63,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "imagepipeline-aar",
|
||||
sha1 = "579954628c8e1da96e1585741f5dae08f282ce3e",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline:aar:2.3.0",
|
||||
sha1 = "dd62dd1607ade4532c1240f137ac3c2d7920c134",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -75,8 +75,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "nativeimagefilters-aar",
|
||||
sha1 = "1f4d81f8f6e2706ae848124d454c99cadd85496c",
|
||||
url = "mvn:com.facebook.fresco:nativeimagefilters:aar:2.3.0",
|
||||
sha1 = "4a30438df8d960000b37b1f8cdba9d7996d57ea9",
|
||||
url = "mvn:com.facebook.fresco:nativeimagefilters:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -87,8 +87,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "nativeimagetranscoder-aar",
|
||||
sha1 = "1b74432d16db744719dfe1d03d4d93850e061d08",
|
||||
url = "mvn:com.facebook.fresco:nativeimagetranscoder:aar:2.3.0",
|
||||
sha1 = "7db353c68b41e2ad502a959c554387d59e75eb75",
|
||||
url = "mvn:com.facebook.fresco:nativeimagetranscoder:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_prebuilt_jar(
|
||||
@@ -111,8 +111,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "fbcore-aar",
|
||||
sha1 = "6d568ce3e1a5377c390dbde6f150884fecd61bd0",
|
||||
url = "mvn:com.facebook.fresco:fbcore:aar:2.3.0",
|
||||
sha1 = "ffe378b572055e0600377c000d390fb46bf278a5",
|
||||
url = "mvn:com.facebook.fresco:fbcore:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -123,8 +123,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "imagepipeline-native-binary-aar",
|
||||
sha1 = "705a3629cfba16ab8c9b2765058380276514342c",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-native:aar:2.3.0",
|
||||
sha1 = "f8e65e897a883ac4f754d57897aaba0016c8beba",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-native:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -135,8 +135,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "imagepipeline-okhttp3-binary-aar",
|
||||
sha1 = "1065513f02b97ee46601d92105151ae9e2111bfc",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:2.3.0",
|
||||
sha1 = "8e274a77ffbe9f8334e09855b2a811b2a63a5708",
|
||||
url = "mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -147,8 +147,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "memory-type-ashmem-aar",
|
||||
sha1 = "d0e2ab70d5d35d08de81d3917b0f5d7bbf4fa82c",
|
||||
url = "mvn:com.facebook.fresco:memory-type-ashmem:aar:2.3.0",
|
||||
sha1 = "b43b53aca89569fd2e8e964b71dc7afbf62204e8",
|
||||
url = "mvn:com.facebook.fresco:memory-type-ashmem:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -159,8 +159,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "memory-type-java-aar",
|
||||
sha1 = "5e8adc594bc9d8f4e8d794dff23c70882fb98e65",
|
||||
url = "mvn:com.facebook.fresco:memory-type-java:aar:2.3.0",
|
||||
sha1 = "57537a8b69dbad44fafdaea3067a776e11586465",
|
||||
url = "mvn:com.facebook.fresco:memory-type-java:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -171,8 +171,8 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "memory-type-native-aar",
|
||||
sha1 = "72bb5626d508587cb9d96beb0e2b61ac36a2c63d",
|
||||
url = "mvn:com.facebook.fresco:memory-type-native:aar:2.3.0",
|
||||
sha1 = "7eb7c52ee2a4d40b7f706c90069549410236aaa5",
|
||||
url = "mvn:com.facebook.fresco:memory-type-native:aar:2.5.0",
|
||||
)
|
||||
|
||||
rn_android_prebuilt_aar(
|
||||
@@ -183,6 +183,6 @@ rn_android_prebuilt_aar(
|
||||
|
||||
remote_file(
|
||||
name = "ui-common-aar",
|
||||
sha1 = "0ce37a495f0f37165e3ede1c4cb927b0b55856be",
|
||||
url = "mvn:com.facebook.fresco:ui-common:aar:2.3.0",
|
||||
sha1 = "224851cf4c074aeff5dc42861b557870459a9d28",
|
||||
url = "mvn:com.facebook.fresco:ui-common:aar:2.5.0",
|
||||
)
|
||||
|
||||
@@ -28,17 +28,17 @@ fb_native.android_prebuilt_aar(
|
||||
fb_native.remote_file(
|
||||
name = "annotation-binary.jar",
|
||||
sha1 = "dc58463712cb3e5f03d8ee5ac9743b9ced9afa77",
|
||||
url = "mvn:com.facebook.soloader:annotation:jar:0.9.0",
|
||||
url = "mvn:com.facebook.soloader:annotation:jar:0.10.1",
|
||||
)
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "nativeloader-binary.jar",
|
||||
sha1 = "677c7fbfcc847d7eb6082048d07b10afd4cff898",
|
||||
url = "mvn:com.facebook.soloader:nativeloader:jar:0.9.0",
|
||||
sha1 = "ba1b31b4b9f65494a90de7c2728b57155344a858",
|
||||
url = "mvn:com.facebook.soloader:nativeloader:jar:0.10.1",
|
||||
)
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "soloader-binary-aar",
|
||||
sha1 = "6e138af1dd29ceabf5bace2d24dc4333f304d104",
|
||||
url = "mvn:com.facebook.soloader:soloader:aar:0.9.0",
|
||||
sha1 = "78e5537c0cdf7c190f6cad9a2490f9f84ee8f041",
|
||||
url = "mvn:com.facebook.soloader:soloader:aar:0.10.1",
|
||||
)
|
||||
|
||||
+4
-4
@@ -30,8 +30,8 @@ rn_prebuilt_jar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "okhttp3-binary.jar",
|
||||
sha1 = "08e17601d3bdc8cf57902c154de021931d2c27c1",
|
||||
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.0",
|
||||
sha1 = "51215279c3fe472c59b6b7dd7491e6ac2e28a81b",
|
||||
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.1",
|
||||
)
|
||||
|
||||
rn_prebuilt_jar(
|
||||
@@ -41,6 +41,6 @@ rn_prebuilt_jar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "okhttp3-urlconnection-binary.jar",
|
||||
sha1 = "94f82aaabdf53e48d7a1c515bf89ce60dcebfbeb",
|
||||
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.0",
|
||||
sha1 = "f45e809215bd0961350148cf5b78707865084e6f",
|
||||
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.1",
|
||||
)
|
||||
|
||||
+2
-2
@@ -19,6 +19,6 @@ rn_prebuilt_jar(
|
||||
|
||||
fb_native.remote_file(
|
||||
name = "okio-binary.jar",
|
||||
sha1 = "0dcc813b08ce5933f8bdfd1dfbab4ad4bd170e7a",
|
||||
url = "mvn:com.squareup.okio:okio:jar:2.9.0",
|
||||
sha1 = "accaddddbb597fb70290fd40358b1ce66b8c2b3d",
|
||||
url = "mvn:com.squareup.okio:okio:jar:2.10.0",
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -18,7 +18,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace facebook::react {
|
||||
|
||||
constexpr struct {
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 0;
|
||||
int32_t Patch = 0;
|
||||
int32_t Minor = 65;
|
||||
int32_t Patch = 3;
|
||||
std::string_view Prerelease = "";
|
||||
} ReactNativeVersion;
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
|
||||
s.public_header_files = "executor/HermesExecutorFactory.h"
|
||||
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
|
||||
"GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1",
|
||||
}
|
||||
s.header_dir = "reacthermes"
|
||||
@@ -46,8 +46,8 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsinspector", version
|
||||
s.dependency "React-perflogger", version
|
||||
s.dependency "RCT-Folly", folly_version
|
||||
s.dependency "RCT-Folly/Futures", folly_version
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "glog"
|
||||
s.dependency "RCT-Folly/Futures", folly_version
|
||||
s.dependency "hermes-engine"
|
||||
end
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
|
||||
#include <folly/Conv.h>
|
||||
#include <folly/Executor.h>
|
||||
@@ -96,6 +97,9 @@ class Connection::Impl : public inspector::InspectorObserver,
|
||||
void handle(const m::heapProfiler::StartSamplingRequest &req) override;
|
||||
void handle(const m::heapProfiler::StopSamplingRequest &req) override;
|
||||
void handle(const m::heapProfiler::CollectGarbageRequest &req) override;
|
||||
void handle(
|
||||
const m::heapProfiler::GetObjectByHeapObjectIdRequest &req) override;
|
||||
void handle(const m::heapProfiler::GetHeapObjectIdRequest &req) override;
|
||||
void handle(const m::runtime::EvaluateRequest &req) override;
|
||||
void handle(const m::runtime::GetPropertiesRequest &req) override;
|
||||
void handle(const m::runtime::RunIfWaitingForDebuggerRequest &req) override;
|
||||
@@ -637,6 +641,76 @@ void Connection::Impl::handle(
|
||||
.thenError<std::exception>(sendErrorToClient(req.id));
|
||||
}
|
||||
|
||||
void Connection::Impl::handle(
|
||||
const m::heapProfiler::GetObjectByHeapObjectIdRequest &req) {
|
||||
uint64_t objID = atoi(req.objectId.c_str());
|
||||
folly::Optional<std::string> group = req.objectGroup;
|
||||
auto remoteObjPtr = std::make_shared<m::runtime::RemoteObject>();
|
||||
|
||||
inspector_
|
||||
->executeIfEnabled(
|
||||
"HeapProfiler.getObjectByHeapObjectId",
|
||||
[this, remoteObjPtr, objID, group](const debugger::ProgramState &) {
|
||||
jsi::Runtime *rt = &getRuntime();
|
||||
if (auto *hermesRT = dynamic_cast<HermesRuntime *>(rt)) {
|
||||
jsi::Value val = hermesRT->getObjectForID(objID);
|
||||
if (val.isNull()) {
|
||||
return;
|
||||
}
|
||||
*remoteObjPtr = m::runtime::makeRemoteObject(
|
||||
getRuntime(), val, objTable_, group.value_or(""));
|
||||
}
|
||||
})
|
||||
.via(executor_.get())
|
||||
.thenValue([this, id = req.id, remoteObjPtr](auto &&) {
|
||||
if (!remoteObjPtr->type.empty()) {
|
||||
m::heapProfiler::GetObjectByHeapObjectIdResponse resp;
|
||||
resp.id = id;
|
||||
resp.result = *remoteObjPtr;
|
||||
sendResponseToClient(resp);
|
||||
} else {
|
||||
sendResponseToClient(m::makeErrorResponse(
|
||||
id, m::ErrorCode::ServerError, "Object is not available"));
|
||||
}
|
||||
})
|
||||
.thenError<std::exception>(sendErrorToClient(req.id));
|
||||
}
|
||||
|
||||
void Connection::Impl::handle(
|
||||
const m::heapProfiler::GetHeapObjectIdRequest &req) {
|
||||
// Use a shared_ptr because the stack frame will go away.
|
||||
std::shared_ptr<uint64_t> snapshotID = std::make_shared<uint64_t>(0);
|
||||
|
||||
inspector_
|
||||
->executeIfEnabled(
|
||||
"HeapProfiler.getHeapObjectId",
|
||||
[this, req, snapshotID](const debugger::ProgramState &) {
|
||||
if (const jsi::Value *valuePtr = objTable_.getValue(req.objectId)) {
|
||||
jsi::Runtime *rt = &getRuntime();
|
||||
if (auto *hermesRT = dynamic_cast<HermesRuntime *>(rt)) {
|
||||
*snapshotID = hermesRT->getUniqueID(*valuePtr);
|
||||
}
|
||||
}
|
||||
})
|
||||
.via(executor_.get())
|
||||
.thenValue([this, id = req.id, snapshotID](auto &&) {
|
||||
if (*snapshotID) {
|
||||
m::heapProfiler::GetHeapObjectIdResponse resp;
|
||||
resp.id = id;
|
||||
// std::to_string is not available on Android, use a std::ostream
|
||||
// instead.
|
||||
std::ostringstream stream;
|
||||
stream << *snapshotID;
|
||||
resp.heapSnapshotObjectId = stream.str();
|
||||
sendResponseToClient(resp);
|
||||
} else {
|
||||
sendResponseToClient(m::makeErrorResponse(
|
||||
id, m::ErrorCode::ServerError, "Object is not available"));
|
||||
}
|
||||
})
|
||||
.thenError<std::exception>(sendErrorToClient(req.id));
|
||||
}
|
||||
|
||||
void Connection::Impl::handle(const m::runtime::EvaluateRequest &req) {
|
||||
auto remoteObjPtr = std::make_shared<m::runtime::RemoteObject>();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
// @generated SignedSource<<f195ef454dab0ca2be532d6cdb2ebd0a>>
|
||||
// @generated SignedSource<<522f29c54f207a4f7b5c33af07cf64d0>>
|
||||
|
||||
#include "MessageTypes.h"
|
||||
|
||||
@@ -46,6 +46,10 @@ std::unique_ptr<Request> Request::fromJsonThrowOnError(const std::string &str) {
|
||||
{"Debugger.stepOver", makeUnique<debugger::StepOverRequest>},
|
||||
{"HeapProfiler.collectGarbage",
|
||||
makeUnique<heapProfiler::CollectGarbageRequest>},
|
||||
{"HeapProfiler.getHeapObjectId",
|
||||
makeUnique<heapProfiler::GetHeapObjectIdRequest>},
|
||||
{"HeapProfiler.getObjectByHeapObjectId",
|
||||
makeUnique<heapProfiler::GetObjectByHeapObjectIdRequest>},
|
||||
{"HeapProfiler.startSampling",
|
||||
makeUnique<heapProfiler::StartSamplingRequest>},
|
||||
{"HeapProfiler.startTrackingHeapObjects",
|
||||
@@ -730,6 +734,65 @@ void heapProfiler::CollectGarbageRequest::accept(
|
||||
handler.handle(*this);
|
||||
}
|
||||
|
||||
heapProfiler::GetHeapObjectIdRequest::GetHeapObjectIdRequest()
|
||||
: Request("HeapProfiler.getHeapObjectId") {}
|
||||
|
||||
heapProfiler::GetHeapObjectIdRequest::GetHeapObjectIdRequest(const dynamic &obj)
|
||||
: Request("HeapProfiler.getHeapObjectId") {
|
||||
assign(id, obj, "id");
|
||||
assign(method, obj, "method");
|
||||
|
||||
dynamic params = obj.at("params");
|
||||
assign(objectId, params, "objectId");
|
||||
}
|
||||
|
||||
dynamic heapProfiler::GetHeapObjectIdRequest::toDynamic() const {
|
||||
dynamic params = dynamic::object;
|
||||
put(params, "objectId", objectId);
|
||||
|
||||
dynamic obj = dynamic::object;
|
||||
put(obj, "id", id);
|
||||
put(obj, "method", method);
|
||||
put(obj, "params", std::move(params));
|
||||
return obj;
|
||||
}
|
||||
|
||||
void heapProfiler::GetHeapObjectIdRequest::accept(
|
||||
RequestHandler &handler) const {
|
||||
handler.handle(*this);
|
||||
}
|
||||
|
||||
heapProfiler::GetObjectByHeapObjectIdRequest::GetObjectByHeapObjectIdRequest()
|
||||
: Request("HeapProfiler.getObjectByHeapObjectId") {}
|
||||
|
||||
heapProfiler::GetObjectByHeapObjectIdRequest::GetObjectByHeapObjectIdRequest(
|
||||
const dynamic &obj)
|
||||
: Request("HeapProfiler.getObjectByHeapObjectId") {
|
||||
assign(id, obj, "id");
|
||||
assign(method, obj, "method");
|
||||
|
||||
dynamic params = obj.at("params");
|
||||
assign(objectId, params, "objectId");
|
||||
assign(objectGroup, params, "objectGroup");
|
||||
}
|
||||
|
||||
dynamic heapProfiler::GetObjectByHeapObjectIdRequest::toDynamic() const {
|
||||
dynamic params = dynamic::object;
|
||||
put(params, "objectId", objectId);
|
||||
put(params, "objectGroup", objectGroup);
|
||||
|
||||
dynamic obj = dynamic::object;
|
||||
put(obj, "id", id);
|
||||
put(obj, "method", method);
|
||||
put(obj, "params", std::move(params));
|
||||
return obj;
|
||||
}
|
||||
|
||||
void heapProfiler::GetObjectByHeapObjectIdRequest::accept(
|
||||
RequestHandler &handler) const {
|
||||
handler.handle(*this);
|
||||
}
|
||||
|
||||
heapProfiler::StartSamplingRequest::StartSamplingRequest()
|
||||
: Request("HeapProfiler.startSampling") {}
|
||||
|
||||
@@ -1071,6 +1134,42 @@ dynamic debugger::SetInstrumentationBreakpointResponse::toDynamic() const {
|
||||
return obj;
|
||||
}
|
||||
|
||||
heapProfiler::GetHeapObjectIdResponse::GetHeapObjectIdResponse(
|
||||
const dynamic &obj) {
|
||||
assign(id, obj, "id");
|
||||
|
||||
dynamic res = obj.at("result");
|
||||
assign(heapSnapshotObjectId, res, "heapSnapshotObjectId");
|
||||
}
|
||||
|
||||
dynamic heapProfiler::GetHeapObjectIdResponse::toDynamic() const {
|
||||
dynamic res = dynamic::object;
|
||||
put(res, "heapSnapshotObjectId", heapSnapshotObjectId);
|
||||
|
||||
dynamic obj = dynamic::object;
|
||||
put(obj, "id", id);
|
||||
put(obj, "result", std::move(res));
|
||||
return obj;
|
||||
}
|
||||
|
||||
heapProfiler::GetObjectByHeapObjectIdResponse::GetObjectByHeapObjectIdResponse(
|
||||
const dynamic &obj) {
|
||||
assign(id, obj, "id");
|
||||
|
||||
dynamic res = obj.at("result");
|
||||
assign(result, res, "result");
|
||||
}
|
||||
|
||||
dynamic heapProfiler::GetObjectByHeapObjectIdResponse::toDynamic() const {
|
||||
dynamic res = dynamic::object;
|
||||
put(res, "result", result);
|
||||
|
||||
dynamic obj = dynamic::object;
|
||||
put(obj, "id", id);
|
||||
put(obj, "result", std::move(res));
|
||||
return obj;
|
||||
}
|
||||
|
||||
heapProfiler::StopSamplingResponse::StopSamplingResponse(const dynamic &obj) {
|
||||
assign(id, obj, "id");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
// @generated SignedSource<<0961e921eb7c5201466836c8ce82de73>>
|
||||
// @generated SignedSource<<a541d174394c8959b9fb6a7c575e7040>>
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -72,6 +72,11 @@ using UnserializableValue = std::string;
|
||||
namespace heapProfiler {
|
||||
struct AddHeapSnapshotChunkNotification;
|
||||
struct CollectGarbageRequest;
|
||||
struct GetHeapObjectIdRequest;
|
||||
struct GetHeapObjectIdResponse;
|
||||
struct GetObjectByHeapObjectIdRequest;
|
||||
struct GetObjectByHeapObjectIdResponse;
|
||||
using HeapSnapshotObjectId = std::string;
|
||||
struct HeapStatsUpdateNotification;
|
||||
struct LastSeenObjectIdNotification;
|
||||
struct ReportHeapSnapshotProgressNotification;
|
||||
@@ -107,6 +112,9 @@ struct RequestHandler {
|
||||
virtual void handle(const debugger::StepOutRequest &req) = 0;
|
||||
virtual void handle(const debugger::StepOverRequest &req) = 0;
|
||||
virtual void handle(const heapProfiler::CollectGarbageRequest &req) = 0;
|
||||
virtual void handle(const heapProfiler::GetHeapObjectIdRequest &req) = 0;
|
||||
virtual void handle(
|
||||
const heapProfiler::GetObjectByHeapObjectIdRequest &req) = 0;
|
||||
virtual void handle(const heapProfiler::StartSamplingRequest &req) = 0;
|
||||
virtual void handle(
|
||||
const heapProfiler::StartTrackingHeapObjectsRequest &req) = 0;
|
||||
@@ -138,6 +146,9 @@ struct NoopRequestHandler : public RequestHandler {
|
||||
void handle(const debugger::StepOutRequest &req) override {}
|
||||
void handle(const debugger::StepOverRequest &req) override {}
|
||||
void handle(const heapProfiler::CollectGarbageRequest &req) override {}
|
||||
void handle(const heapProfiler::GetHeapObjectIdRequest &req) override {}
|
||||
void handle(
|
||||
const heapProfiler::GetObjectByHeapObjectIdRequest &req) override {}
|
||||
void handle(const heapProfiler::StartSamplingRequest &req) override {}
|
||||
void handle(
|
||||
const heapProfiler::StartTrackingHeapObjectsRequest &req) override {}
|
||||
@@ -464,6 +475,27 @@ struct heapProfiler::CollectGarbageRequest : public Request {
|
||||
void accept(RequestHandler &handler) const override;
|
||||
};
|
||||
|
||||
struct heapProfiler::GetHeapObjectIdRequest : public Request {
|
||||
GetHeapObjectIdRequest();
|
||||
explicit GetHeapObjectIdRequest(const folly::dynamic &obj);
|
||||
|
||||
folly::dynamic toDynamic() const override;
|
||||
void accept(RequestHandler &handler) const override;
|
||||
|
||||
runtime::RemoteObjectId objectId{};
|
||||
};
|
||||
|
||||
struct heapProfiler::GetObjectByHeapObjectIdRequest : public Request {
|
||||
GetObjectByHeapObjectIdRequest();
|
||||
explicit GetObjectByHeapObjectIdRequest(const folly::dynamic &obj);
|
||||
|
||||
folly::dynamic toDynamic() const override;
|
||||
void accept(RequestHandler &handler) const override;
|
||||
|
||||
heapProfiler::HeapSnapshotObjectId objectId{};
|
||||
folly::Optional<std::string> objectGroup;
|
||||
};
|
||||
|
||||
struct heapProfiler::StartSamplingRequest : public Request {
|
||||
StartSamplingRequest();
|
||||
explicit StartSamplingRequest(const folly::dynamic &obj);
|
||||
@@ -602,6 +634,22 @@ struct debugger::SetInstrumentationBreakpointResponse : public Response {
|
||||
debugger::BreakpointId breakpointId{};
|
||||
};
|
||||
|
||||
struct heapProfiler::GetHeapObjectIdResponse : public Response {
|
||||
GetHeapObjectIdResponse() = default;
|
||||
explicit GetHeapObjectIdResponse(const folly::dynamic &obj);
|
||||
folly::dynamic toDynamic() const override;
|
||||
|
||||
heapProfiler::HeapSnapshotObjectId heapSnapshotObjectId{};
|
||||
};
|
||||
|
||||
struct heapProfiler::GetObjectByHeapObjectIdResponse : public Response {
|
||||
GetObjectByHeapObjectIdResponse() = default;
|
||||
explicit GetObjectByHeapObjectIdResponse(const folly::dynamic &obj);
|
||||
folly::dynamic toDynamic() const override;
|
||||
|
||||
runtime::RemoteObject result{};
|
||||
};
|
||||
|
||||
struct heapProfiler::StopSamplingResponse : public Response {
|
||||
StopSamplingResponse() = default;
|
||||
explicit StopSamplingResponse(const folly::dynamic &obj);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <hermes/DebuggerAPI.h>
|
||||
#include <hermes/hermes.h>
|
||||
#include <hermes/inspector/chrome/MessageTypes.h>
|
||||
#include <jsi/instrumentation.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace hermes {
|
||||
@@ -2512,6 +2513,86 @@ TEST(ConnectionTests, heapProfilerSampling) {
|
||||
expectNotification<m::debugger::ResumedNotification>(conn);
|
||||
}
|
||||
|
||||
TEST(ConnectionTests, heapSnapshotRemoteObject) {
|
||||
TestContext context;
|
||||
AsyncHermesRuntime &asyncRuntime = context.runtime();
|
||||
std::shared_ptr<HermesRuntime> runtime = asyncRuntime.runtime();
|
||||
SyncConnection &conn = context.conn();
|
||||
int msgId = 1;
|
||||
|
||||
send<m::debugger::EnableRequest>(conn, msgId++);
|
||||
expectExecutionContextCreated(conn);
|
||||
|
||||
asyncRuntime.executeScriptAsync(R"(
|
||||
storeValue([1, 2, 3]);
|
||||
debugger;
|
||||
)");
|
||||
expectNotification<m::debugger::ScriptParsedNotification>(conn);
|
||||
|
||||
// We should get a pause before the first statement.
|
||||
expectNotification<m::debugger::PausedNotification>(conn);
|
||||
|
||||
{
|
||||
// Take a heap snapshot first to assign IDs.
|
||||
m::heapProfiler::TakeHeapSnapshotRequest req;
|
||||
req.id = msgId++;
|
||||
req.reportProgress = false;
|
||||
// We don't need the response because we can directly query for object IDs
|
||||
// from the runtime.
|
||||
send(conn, req);
|
||||
}
|
||||
|
||||
const uint64_t globalObjID = runtime->getUniqueID(runtime->global());
|
||||
jsi::Value storedValue = asyncRuntime.awaitStoredValue();
|
||||
const uint64_t storedObjID =
|
||||
runtime->getUniqueID(storedValue.asObject(*runtime));
|
||||
|
||||
auto testObject = [&msgId, &conn](
|
||||
uint64_t objID,
|
||||
const char *type,
|
||||
const char *className,
|
||||
const char *description,
|
||||
const char *subtype) {
|
||||
// Get the object by its snapshot ID.
|
||||
m::heapProfiler::GetObjectByHeapObjectIdRequest req;
|
||||
req.id = msgId++;
|
||||
req.objectId = std::to_string(objID);
|
||||
auto resp = send<
|
||||
m::heapProfiler::GetObjectByHeapObjectIdRequest,
|
||||
m::heapProfiler::GetObjectByHeapObjectIdResponse>(conn, req);
|
||||
EXPECT_EQ(resp.result.type, type);
|
||||
EXPECT_EQ(resp.result.className, className);
|
||||
EXPECT_EQ(resp.result.description, description);
|
||||
if (subtype) {
|
||||
EXPECT_EQ(resp.result.subtype, subtype);
|
||||
}
|
||||
|
||||
// Check that fetching the object by heap snapshot ID works.
|
||||
m::heapProfiler::GetHeapObjectIdRequest idReq;
|
||||
idReq.id = msgId++;
|
||||
idReq.objectId = resp.result.objectId.value();
|
||||
auto idResp = send<
|
||||
m::heapProfiler::GetHeapObjectIdRequest,
|
||||
m::heapProfiler::GetHeapObjectIdResponse>(conn, idReq);
|
||||
EXPECT_EQ(atoi(idResp.heapSnapshotObjectId.c_str()), objID);
|
||||
};
|
||||
|
||||
// Test once before a collection.
|
||||
testObject(globalObjID, "object", "Object", "Object", nullptr);
|
||||
testObject(storedObjID, "object", "Array", "Array(3)", "array");
|
||||
// Force a collection to move the heap.
|
||||
runtime->instrumentation().collectGarbage("test");
|
||||
// A collection should not disturb the unique ID lookup, and it should be the
|
||||
// same object as before. Note that it won't have the same remote ID, because
|
||||
// Hermes doesn't do uniquing.
|
||||
testObject(globalObjID, "object", "Object", "Object", nullptr);
|
||||
testObject(storedObjID, "object", "Array", "Array(3)", "array");
|
||||
|
||||
// Resume and exit.
|
||||
send<m::debugger::ResumeRequest>(conn, msgId++);
|
||||
expectNotification<m::debugger::ResumedNotification>(conn);
|
||||
}
|
||||
|
||||
} // namespace chrome
|
||||
} // namespace inspector
|
||||
} // namespace hermes
|
||||
|
||||
@@ -26,6 +26,8 @@ HeapProfiler.startSampling
|
||||
HeapProfiler.stopSampling
|
||||
HeapProfiler.heapStatsUpdate
|
||||
HeapProfiler.lastSeenObjectId
|
||||
HeapProfiler.getObjectByHeapObjectId
|
||||
HeapProfiler.getHeapObjectId
|
||||
Runtime.consoleAPICalled
|
||||
Runtime.evaluate
|
||||
Runtime.executionContextCreated
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
+3
-16
@@ -10,15 +10,10 @@ buildscript {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter {
|
||||
content {
|
||||
includeModule("org.jetbrains.trove4j", "trove4j")
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:4.1.0")
|
||||
classpath("de.undercouch:gradle-download-task:4.0.2")
|
||||
classpath("com.android.tools.build:gradle:4.2.1")
|
||||
classpath("de.undercouch:gradle-download-task:4.1.1")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -38,18 +33,10 @@ allprojects {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter {
|
||||
content {
|
||||
includeModule("org.jetbrains.trove4j", "trove4j")
|
||||
includeModule("com.facebook.yoga", "proguard-annotations")
|
||||
includeModule("com.facebook.fbjni", "fbjni-java-only")
|
||||
includeModule("com.facebook.fresco", "stetho")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// used to override ndk path on CI
|
||||
if (System.getenv("LOCAL_ANDROID_NDK_VERSION") != null) {
|
||||
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
|
||||
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,3 +5,4 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
|
||||
org.gradle.parallel=true
|
||||
|
||||
ANDROID_NDK_VERSION=20.1.5948944
|
||||
android.useAndroidX=true
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
+15
-19
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"private": true,
|
||||
"version": "1000.0.0",
|
||||
"version": "0.65.3",
|
||||
"bin": "./cli.js",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "MIT",
|
||||
@@ -81,18 +80,14 @@
|
||||
"test-ios-e2e": "detox test -c ios.sim.release packages/rn-tester/e2e",
|
||||
"test-ios": "./scripts/objc-test.sh test"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/!(eslint-config-react-native-community)",
|
||||
"repo-config"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"react": "17.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/create-cache-key-function": "^26.5.0",
|
||||
"@react-native-community/cli": "^5.0.1-alpha.0",
|
||||
"@react-native-community/cli-platform-android": "^5.0.1-alpha.0",
|
||||
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.0",
|
||||
"@jest/create-cache-key-function": "^27.0.1",
|
||||
"@react-native-community/cli": "^6.0.0",
|
||||
"@react-native-community/cli-platform-android": "^6.0.0",
|
||||
"@react-native-community/cli-platform-ios": "^6.0.0",
|
||||
"@react-native/assets": "1.0.0",
|
||||
"@react-native/normalize-color": "1.0.0",
|
||||
"@react-native/polyfills": "1.0.0",
|
||||
@@ -100,13 +95,13 @@
|
||||
"anser": "^1.4.9",
|
||||
"base64-js": "^1.1.2",
|
||||
"event-target-shim": "^5.0.1",
|
||||
"hermes-engine": "~0.7.0",
|
||||
"hermes-engine": "~0.8.1",
|
||||
"invariant": "^2.2.4",
|
||||
"jsc-android": "^245459.0.0",
|
||||
"metro-babel-register": "0.66.0",
|
||||
"metro-react-native-babel-transformer": "0.66.0",
|
||||
"metro-runtime": "0.66.0",
|
||||
"metro-source-map": "0.66.0",
|
||||
"jsc-android": "^250230.2.1",
|
||||
"metro-babel-register": "0.66.2",
|
||||
"metro-react-native-babel-transformer": "0.66.2",
|
||||
"metro-runtime": "0.66.2",
|
||||
"metro-source-map": "0.66.2",
|
||||
"nullthrows": "^1.1.1",
|
||||
"pretty-format": "^26.5.2",
|
||||
"promise": "^8.0.3",
|
||||
@@ -114,7 +109,7 @@
|
||||
"react-devtools-core": "^4.6.0",
|
||||
"react-refresh": "^0.4.0",
|
||||
"regenerator-runtime": "^0.13.2",
|
||||
"scheduler": "^0.20.1",
|
||||
"scheduler": "^0.20.2",
|
||||
"stacktrace-parser": "^0.1.3",
|
||||
"use-subscription": "^1.0.0",
|
||||
"whatwg-fetch": "^3.0.0",
|
||||
@@ -122,7 +117,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-bin": "^0.149.0",
|
||||
"react": "17.0.2"
|
||||
"react": "17.0.2",
|
||||
"shelljs": "^0.7.8"
|
||||
},
|
||||
"detox": {
|
||||
"test-runner": "jest",
|
||||
@@ -161,4 +157,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,6 @@ module.exports = {
|
||||
const properties = args[0].properties;
|
||||
if (
|
||||
!(
|
||||
properties.length === 2 &&
|
||||
properties[0].type === 'Property' &&
|
||||
properties[0].key.name === 'light' &&
|
||||
properties[1].type === 'Property' &&
|
||||
|
||||
@@ -12,14 +12,9 @@ buildscript {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter {
|
||||
content {
|
||||
includeGroup("org.jetbrains.trove4j")
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:4.1.0")
|
||||
classpath("com.android.tools.build:gradle:4.2.1")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +23,6 @@ allprojects {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter {
|
||||
content {
|
||||
includeGroup("org.jetbrains.trove4j")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -10,10 +10,5 @@ allprojects {
|
||||
mavenLocal()
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter {
|
||||
content {
|
||||
includeGroup("org.jetbrains.trove4j")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ gradlePlugin {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.tools.build:gradle:4.1.0'
|
||||
implementation 'com.android.tools.build:gradle:4.2.1'
|
||||
// Use the same Gson version that `com.android.tools.build:gradle` depends on.
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
implementation 'com.google.guava:guava:29.0-jre'
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
plugins {
|
||||
`java-gradle-plugin`
|
||||
`kotlin-dsl`
|
||||
kotlin("jvm") version "1.4.21"
|
||||
kotlin("jvm") version "1.4.20"
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
@@ -26,5 +26,5 @@ gradlePlugin {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.android.tools.build:gradle:4.1.0")
|
||||
implementation("com.android.tools.build:gradle:4.2.1")
|
||||
}
|
||||
|
||||
+336
-667
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@ else
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2020.01.13.00'
|
||||
folly_version = '2021.04.26.00'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTTest"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#ifndef RCT_USE_HERMES
|
||||
#if __has_include(<hermes/hermes.h>)
|
||||
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
|
||||
#define RCT_USE_HERMES 1
|
||||
#else
|
||||
#define RCT_USE_HERMES 0
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
2DDEF0101F84BF7B00DBDF73 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */; };
|
||||
383889DA23A7398900D06C3E /* RCTConvert_UIColorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 383889D923A7398900D06C3E /* RCTConvert_UIColorTests.m */; };
|
||||
3D2AFAF51D646CF80089D1A3 /* legacy_image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */; };
|
||||
520C5A8AC8F3317FF11A0299 /* libPods-RNTesterIntegrationTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */; };
|
||||
5C60EB1C226440DB0018C04F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C60EB1B226440DB0018C04F /* AppDelegate.mm */; };
|
||||
5CB07C9B226467E60039471C /* RNTesterTurboModuleProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */; };
|
||||
682424F330D42708B52AA9A8 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 88EFE7E584B42816405BA434 /* libPods-RNTester.a */; };
|
||||
7B37A0C3E18EDC90CCD01CA2 /* libPods-RNTesterIntegrationTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */; };
|
||||
8145AE06241172D900A3F8DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8145AE05241172D900A3F8DA /* LaunchScreen.storyboard */; };
|
||||
DCB59B3E303512590BDA64B9 /* libPods-RNTesterUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */; };
|
||||
8D4B1343F60604EF446CC080 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */; };
|
||||
B1AFC227D5A47B418C146713 /* libPods-RNTesterUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */; };
|
||||
E7C1241A22BEC44B00DA25C0 /* RNTesterIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7C1241922BEC44B00DA25C0 /* RNTesterIntegrationTests.m */; };
|
||||
E7DB20D122B2BAA6005AC45F /* RCTBundleURLProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7DB20A922B2BAA3005AC45F /* RCTBundleURLProviderTests.m */; };
|
||||
E7DB20D222B2BAA6005AC45F /* RCTModuleInitNotificationRaceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7DB20AA22B2BAA3005AC45F /* RCTModuleInitNotificationRaceTests.m */; };
|
||||
@@ -77,6 +77,7 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.debug.xcconfig"; path = "Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
0CC3BE1A25DDB68A0033CAEB /* RNTester.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = RNTester.entitlements; path = RNTester/RNTester.entitlements; sourceTree = "<group>"; };
|
||||
13B07F961A680F5B00A75B9A /* RNTester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNTester.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNTester/AppDelegate.h; sourceTree = "<group>"; };
|
||||
@@ -87,20 +88,18 @@
|
||||
27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlexibleSizeExampleView.m; path = RNTester/NativeExampleViews/FlexibleSizeExampleView.m; sourceTree = "<group>"; };
|
||||
27F441EA1BEBE5030039B79C /* FlexibleSizeExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlexibleSizeExampleView.h; path = RNTester/NativeExampleViews/FlexibleSizeExampleView.h; sourceTree = "<group>"; };
|
||||
2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNTester/Images.xcassets; sourceTree = "<group>"; };
|
||||
34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
383889D923A7398900D06C3E /* RCTConvert_UIColorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTConvert_UIColorTests.m; sourceTree = "<group>"; };
|
||||
3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "legacy_image@2x.png"; path = "RNTester/legacy_image@2x.png"; sourceTree = "<group>"; };
|
||||
5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.release.xcconfig"; path = "Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5C60EB1B226440DB0018C04F /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RNTester/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RNTesterTurboModuleProvider.mm; path = RNTester/RNTesterTurboModuleProvider.mm; sourceTree = "<group>"; };
|
||||
5CB07C9A226467E60039471C /* RNTesterTurboModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTesterTurboModuleProvider.h; path = RNTester/RNTesterTurboModuleProvider.h; sourceTree = "<group>"; };
|
||||
6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
8145AE05241172D900A3F8DA /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RNTester/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
88EFE7E584B42816405BA434 /* libPods-RNTester.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTester.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterIntegrationTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.debug.xcconfig"; path = "Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTester.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.release.xcconfig"; path = "Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterIntegrationTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E771AEEA22B44E3100EA1189 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNTester/Info.plist; sourceTree = "<group>"; };
|
||||
E7C1241922BEC44B00DA25C0 /* RNTesterIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNTesterIntegrationTests.m; sourceTree = "<group>"; };
|
||||
E7DB209F22B2BA84005AC45F /* RNTesterUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNTesterUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -173,7 +172,8 @@
|
||||
E7DB216022B2F3EC005AC45F /* RNTesterSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNTesterSnapshotTests.m; sourceTree = "<group>"; };
|
||||
E7DB216122B2F3EC005AC45F /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
|
||||
E7DB218B22B41FCD005AC45F /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.release.xcconfig"; path = "Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.debug.xcconfig"; path = "Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -181,7 +181,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
682424F330D42708B52AA9A8 /* libPods-RNTester.a in Frameworks */,
|
||||
8D4B1343F60604EF446CC080 /* libPods-RNTester.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -191,7 +191,7 @@
|
||||
files = (
|
||||
E7DB213122B2C649005AC45F /* JavaScriptCore.framework in Frameworks */,
|
||||
E7DB213222B2C67D005AC45F /* libOCMock.a in Frameworks */,
|
||||
DCB59B3E303512590BDA64B9 /* libPods-RNTesterUnitTests.a in Frameworks */,
|
||||
B1AFC227D5A47B418C146713 /* libPods-RNTesterUnitTests.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -201,7 +201,7 @@
|
||||
files = (
|
||||
E7DB218C22B41FCD005AC45F /* XCTest.framework in Frameworks */,
|
||||
E7DB216722B2F69F005AC45F /* JavaScriptCore.framework in Frameworks */,
|
||||
7B37A0C3E18EDC90CCD01CA2 /* libPods-RNTesterIntegrationTests.a in Frameworks */,
|
||||
520C5A8AC8F3317FF11A0299 /* libPods-RNTesterIntegrationTests.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -272,26 +272,13 @@
|
||||
E7DB211822B2BD53005AC45F /* libReact-RCTText.a */,
|
||||
E7DB211A22B2BD53005AC45F /* libReact-RCTVibration.a */,
|
||||
E7DB212222B2BD53005AC45F /* libyoga.a */,
|
||||
88EFE7E584B42816405BA434 /* libPods-RNTester.a */,
|
||||
E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */,
|
||||
6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */,
|
||||
A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */,
|
||||
D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */,
|
||||
C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
571A4A20844C3BA40A3D302B /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */,
|
||||
5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */,
|
||||
972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */,
|
||||
7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */,
|
||||
34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */,
|
||||
E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
680759612239798500290469 /* Fabric */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -299,6 +286,20 @@
|
||||
name = Fabric;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6DC9CB22934497EC8CDB0BD8 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */,
|
||||
5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */,
|
||||
FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */,
|
||||
EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */,
|
||||
8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */,
|
||||
C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
83CBB9F61A601CBA00E9B192 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -307,7 +308,7 @@
|
||||
E7DB215422B2F332005AC45F /* RNTesterIntegrationTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2DE7E7D81FB2A4F3009E225D /* Frameworks */,
|
||||
571A4A20844C3BA40A3D302B /* Pods */,
|
||||
6DC9CB22934497EC8CDB0BD8 /* Pods */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
@@ -401,14 +402,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNTester" */;
|
||||
buildPhases = (
|
||||
F9CB97B0D9633939D43E75E0 /* [CP] Check Pods Manifest.lock */,
|
||||
8FBA37A5A7720F537D5096B3 /* [CP] Check Pods Manifest.lock */,
|
||||
13B07F871A680F5B00A75B9A /* Sources */,
|
||||
13B07F8C1A680F5B00A75B9A /* Frameworks */,
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */,
|
||||
5CF0FD27207FC6EC00C13D65 /* Start Metro */,
|
||||
CD2B49A7F80C8171E7A5B233 /* [CP] Copy Pods Resources */,
|
||||
FCBC860F39D3E385BA7C6FF7 /* [CP] Embed Pods Frameworks */,
|
||||
11C8C367B5AE5CE68420F0F5 /* [CP] Embed Pods Frameworks */,
|
||||
ED7305C9A668EAE86E6BEB22 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -423,11 +424,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = E7DB20A622B2BA84005AC45F /* Build configuration list for PBXNativeTarget "RNTesterUnitTests" */;
|
||||
buildPhases = (
|
||||
64C8C8D2305EEDFDE304A0E6 /* [CP] Check Pods Manifest.lock */,
|
||||
1A0EBCA8D423BF7BD689C3A8 /* [CP] Check Pods Manifest.lock */,
|
||||
E7DB209B22B2BA84005AC45F /* Sources */,
|
||||
E7DB209C22B2BA84005AC45F /* Frameworks */,
|
||||
E7DB209D22B2BA84005AC45F /* Resources */,
|
||||
71ADC6D58A978687B97C823F /* [CP] Copy Pods Resources */,
|
||||
D1DD941CFAC4C518C421DF62 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -443,11 +444,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = E7DB215A22B2F332005AC45F /* Build configuration list for PBXNativeTarget "RNTesterIntegrationTests" */;
|
||||
buildPhases = (
|
||||
56D84768A7BBB2750D674CF3 /* [CP] Check Pods Manifest.lock */,
|
||||
C68A15BF396EBF6908EA859E /* [CP] Check Pods Manifest.lock */,
|
||||
E7DB214F22B2F332005AC45F /* Sources */,
|
||||
E7DB215022B2F332005AC45F /* Frameworks */,
|
||||
E7DB215122B2F332005AC45F /* Resources */,
|
||||
87FAF758B87BEA78F26A2B92 /* [CP] Copy Pods Resources */,
|
||||
38616D09A9447C97ADDDB269 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -526,44 +527,24 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
56D84768A7BBB2750D674CF3 /* [CP] Check Pods Manifest.lock */ = {
|
||||
11C8C367B5AE5CE68420F0F5 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RNTesterIntegrationTests-checkManifestLockResult.txt",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
5CF0FD27207FC6EC00C13D65 /* Start Metro */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Start Metro";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../../scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
64C8C8D2305EEDFDE304A0E6 /* [CP] Check Pods Manifest.lock */ = {
|
||||
1A0EBCA8D423BF7BD689C3A8 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -585,38 +566,7 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Build JS Bundle";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
|
||||
};
|
||||
71ADC6D58A978687B97C823F /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
87FAF758B87BEA78F26A2B92 /* [CP] Copy Pods Resources */ = {
|
||||
38616D09A9447C97ADDDB269 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -633,7 +583,97 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
CD2B49A7F80C8171E7A5B233 /* [CP] Copy Pods Resources */ = {
|
||||
5CF0FD27207FC6EC00C13D65 /* Start Metro */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Start Metro";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../../scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Build JS Bundle";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
|
||||
};
|
||||
8FBA37A5A7720F537D5096B3 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RNTester-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C68A15BF396EBF6908EA859E /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RNTesterIntegrationTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
D1DD941CFAC4C518C421DF62 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
ED7305C9A668EAE86E6BEB22 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -650,41 +690,6 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
F9CB97B0D9633939D43E75E0 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RNTester-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FCBC860F39D3E385BA7C6FF7 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -766,7 +771,7 @@
|
||||
/* Begin XCBuildConfiguration section */
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */;
|
||||
baseConfigurationReference = 08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = RNTester/RNTester.entitlements;
|
||||
@@ -799,7 +804,7 @@
|
||||
};
|
||||
13B07F951A680F5B00A75B9A /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */;
|
||||
baseConfigurationReference = 5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = RNTester/RNTester.entitlements;
|
||||
@@ -993,7 +998,7 @@
|
||||
};
|
||||
E7DB20A722B2BA84005AC45F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */;
|
||||
baseConfigurationReference = 8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
@@ -1029,7 +1034,7 @@
|
||||
};
|
||||
E7DB20A822B2BA84005AC45F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */;
|
||||
baseConfigurationReference = C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
@@ -1065,7 +1070,7 @@
|
||||
};
|
||||
E7DB215B22B2F332005AC45F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */;
|
||||
baseConfigurationReference = FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
@@ -1103,7 +1108,7 @@
|
||||
};
|
||||
E7DB215C22B2F332005AC45F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */;
|
||||
baseConfigurationReference = EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
|
||||
@@ -131,10 +131,7 @@ def useIntlJsc = false
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
ndkVersion ANDROID_NDK_VERSION
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dexOptions {
|
||||
javaMaxHeapSize "4g"
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
# Version of flipper SDK to use with React Native
|
||||
FLIPPER_VERSION=0.75.1
|
||||
FLIPPER_VERSION=0.93.0
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
||||
<provider
|
||||
android:name="com.facebook.react.modules.blob.BlobProvider"
|
||||
android:authorities="@string/blob_provider_authority"
|
||||
android:exported="false"
|
||||
/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
-12
@@ -7,12 +7,10 @@
|
||||
|
||||
package com.facebook.react.uiapp;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.ReactRootView;
|
||||
|
||||
public class RNTesterActivity extends ReactActivity {
|
||||
@@ -64,14 +62,4 @@ public class RNTesterActivity extends ReactActivity {
|
||||
protected String getMainComponentName() {
|
||||
return "RNTesterApp";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
ReactInstanceManager instanceManager = getReactInstanceManager();
|
||||
|
||||
if (instanceManager != null) {
|
||||
instanceManager.onConfigurationChanged(this, newConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">RNTester App</string>
|
||||
<string name="blob_provider_authority">com.facebook.react.uiapp.blobs</string>
|
||||
</resources>
|
||||
|
||||
@@ -32,6 +32,58 @@ type ImageSource = $ReadOnly<{|
|
||||
uri: string,
|
||||
|}>;
|
||||
|
||||
type BlobImageState = {|
|
||||
objectURL: ?string,
|
||||
|};
|
||||
|
||||
type BlobImageProps = $ReadOnly<{|
|
||||
url: string,
|
||||
|}>;
|
||||
|
||||
class BlobImage extends React.Component<BlobImageProps, BlobImageState> {
|
||||
state = {
|
||||
objectURL: null,
|
||||
};
|
||||
|
||||
UNSAFE_componentWillMount() {
|
||||
(async () => {
|
||||
const result = await fetch(this.props.url);
|
||||
const blob = await result.blob();
|
||||
const objectURL = URL.createObjectURL(blob);
|
||||
this.setState({objectURL});
|
||||
})();
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.state.objectURL !== null ? (
|
||||
<Image source={{uri: this.state.objectURL}} style={styles.base} />
|
||||
) : (
|
||||
<Text>Object URL not created yet</Text>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
type BlobImageExampleState = {||};
|
||||
|
||||
type BlobImageExampleProps = $ReadOnly<{|
|
||||
urls: string[],
|
||||
|}>;
|
||||
|
||||
class BlobImageExample extends React.Component<
|
||||
BlobImageExampleProps,
|
||||
BlobImageExampleState,
|
||||
> {
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.horizontal}>
|
||||
{this.props.urls.map(url => (
|
||||
<BlobImage key={url} url={url} />
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
type NetworkImageCallbackExampleState = {|
|
||||
events: Array<string>,
|
||||
startLoadPrefetched: boolean,
|
||||
@@ -608,6 +660,21 @@ exports.examples = [
|
||||
return <Image source={fullImage} style={styles.base} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Plain Blob Image',
|
||||
description: ('If the `source` prop `uri` property is an object URL, ' +
|
||||
'then it will be resolved using `BlobProvider` (Android) or `RCTBlobManager` (iOS).': string),
|
||||
render: function(): React.Node {
|
||||
return (
|
||||
<BlobImageExample
|
||||
urls={[
|
||||
'https://www.facebook.com/favicon.ico',
|
||||
'https://www.facebook.com/ads/pics/successstories.png',
|
||||
]}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Plain Static Image',
|
||||
description: ('Static assets should be placed in the source code tree, and ' +
|
||||
|
||||
@@ -236,6 +236,20 @@ function DynamicColorsExample() {
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.row}>
|
||||
<Text style={styles.labelCell}>
|
||||
DynamicColorIOS({'{\n'}
|
||||
{' '}light: 'red', dark: 'blue'{'\n'}
|
||||
{'}'})
|
||||
</Text>
|
||||
<View
|
||||
style={{
|
||||
...styles.colorCell,
|
||||
borderColor: DynamicColorIOS({light: 'red', dark: 'blue'}),
|
||||
borderWidth: 1,
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.row}>
|
||||
<Text style={styles.labelCell}>
|
||||
DynamicColorIOS({'{\n'}
|
||||
|
||||
@@ -383,6 +383,15 @@ class TextExample extends React.Component<{...}> {
|
||||
<RNTesterBlock title="Font Weight">
|
||||
<Text style={{fontWeight: 'bold'}}>Move fast and be bold</Text>
|
||||
<Text style={{fontWeight: 'normal'}}>Move fast and be normal</Text>
|
||||
<Text style={{fontWeight: '900'}}>FONT WEIGHT 900</Text>
|
||||
<Text style={{fontWeight: '800'}}>FONT WEIGHT 800</Text>
|
||||
<Text style={{fontWeight: '700'}}>FONT WEIGHT 700</Text>
|
||||
<Text style={{fontWeight: '600'}}>FONT WEIGHT 600</Text>
|
||||
<Text style={{fontWeight: '500'}}>FONT WEIGHT 500</Text>
|
||||
<Text style={{fontWeight: '400'}}>FONT WEIGHT 400</Text>
|
||||
<Text style={{fontWeight: '300'}}>FONT WEIGHT 300</Text>
|
||||
<Text style={{fontWeight: '200'}}>FONT WEIGHT 200</Text>
|
||||
<Text style={{fontWeight: '100'}}>FONT WEIGHT 100</Text>
|
||||
</RNTesterBlock>
|
||||
<RNTesterBlock title="Font Style">
|
||||
<Text style={{fontStyle: 'italic'}}>Move fast and be italic</Text>
|
||||
|
||||
@@ -603,21 +603,17 @@ exports.examples = [
|
||||
render: function(): React.Node {
|
||||
return (
|
||||
<View>
|
||||
<Text style={{fontSize: 20, fontWeight: '100'}}>
|
||||
Move fast and be ultralight
|
||||
</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: '200'}}>
|
||||
Move fast and be light
|
||||
</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: 'normal'}}>
|
||||
Move fast and be normal
|
||||
</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>
|
||||
Move fast and be bold
|
||||
</Text>
|
||||
<Text style={{fontSize: 20, fontWeight: '900'}}>
|
||||
Move fast and be ultrabold
|
||||
</Text>
|
||||
<Text style={{fontWeight: 'bold'}}>Move fast and be bold</Text>
|
||||
<Text style={{fontWeight: 'normal'}}>Move fast and be normal</Text>
|
||||
<Text style={{fontWeight: '900'}}>FONT WEIGHT 900</Text>
|
||||
<Text style={{fontWeight: '800'}}>FONT WEIGHT 800</Text>
|
||||
<Text style={{fontWeight: '700'}}>FONT WEIGHT 700</Text>
|
||||
<Text style={{fontWeight: '600'}}>FONT WEIGHT 600</Text>
|
||||
<Text style={{fontWeight: '500'}}>FONT WEIGHT 500</Text>
|
||||
<Text style={{fontWeight: '400'}}>FONT WEIGHT 400</Text>
|
||||
<Text style={{fontWeight: '300'}}>FONT WEIGHT 300</Text>
|
||||
<Text style={{fontWeight: '200'}}>FONT WEIGHT 200</Text>
|
||||
<Text style={{fontWeight: '100'}}>FONT WEIGHT 100</Text>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
|
||||
+17
-9
@@ -28,17 +28,11 @@ def detectCliPath(config) {
|
||||
if (config.cliPath) {
|
||||
return config.cliPath
|
||||
}
|
||||
|
||||
def cliPath = ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text.trim()
|
||||
|
||||
if (cliPath) {
|
||||
return cliPath
|
||||
} else if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
|
||||
if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
|
||||
return "${projectDir}/../../node_modules/react-native/cli.js"
|
||||
} else {
|
||||
throw new Exception("Couldn't determine CLI location. " +
|
||||
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
|
||||
}
|
||||
throw new Exception("Couldn't determine CLI location. " +
|
||||
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
|
||||
}
|
||||
|
||||
def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
|
||||
@@ -363,3 +357,17 @@ afterEvaluate {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Patch needed for https://github.com/facebook/react-native/issues/35210
|
||||
// This is a patch to short-circuit the "+" dependencies inside the
|
||||
// users' app/build.gradle file and the various .gradle files of libraries.
|
||||
// As using plain "+" dependencies causes Gradle to always download the latest,
|
||||
// this logic forces Gradle to use latest release in the minor series.
|
||||
project.rootProject.allprojects {
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force "com.facebook.react:react-native:0.65.+"
|
||||
force "com.facebook.react:hermes-engine:0.65.+"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
## ANDROID ##
|
||||
# Android SDK Build Tools revision
|
||||
export ANDROID_SDK_BUILD_TOOLS_REVISION=29.0.3
|
||||
export ANDROID_SDK_BUILD_TOOLS_REVISION=30.0.2
|
||||
# Android API Level we build with
|
||||
export ANDROID_SDK_BUILD_API_LEVEL="28"
|
||||
# Google APIs for Android level
|
||||
|
||||
+43
-22
@@ -19,6 +19,7 @@
|
||||
const fs = require('fs');
|
||||
const {cat, echo, exec, exit, sed} = require('shelljs');
|
||||
const yargs = require('yargs');
|
||||
const {parseVersion} = require('./version-utils');
|
||||
|
||||
let argv = yargs
|
||||
.option('r', {
|
||||
@@ -29,17 +30,27 @@ let argv = yargs
|
||||
alias: 'nightly',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
})
|
||||
.option('v', {
|
||||
alias: 'to-version',
|
||||
type: 'string',
|
||||
})
|
||||
.option('l', {
|
||||
alias: 'latest',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
}).argv;
|
||||
|
||||
const nightlyBuild = argv.nightly;
|
||||
const version = argv.toVersion;
|
||||
|
||||
let version, branch;
|
||||
if (nightlyBuild) {
|
||||
const currentCommit = exec('git rev-parse HEAD', {
|
||||
silent: true,
|
||||
}).stdout.trim();
|
||||
version = `0.0.0-${currentCommit.slice(0, 9)}`;
|
||||
} else {
|
||||
if (!version) {
|
||||
echo('You must specify a version using -v');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
let branch;
|
||||
if (!nightlyBuild) {
|
||||
// Check we are in release branch, e.g. 0.33-stable
|
||||
branch = exec('git symbolic-ref --short HEAD', {
|
||||
silent: true,
|
||||
@@ -55,24 +66,24 @@ if (nightlyBuild) {
|
||||
|
||||
// - check that argument version matches branch
|
||||
// e.g. 0.33.1 or 0.33.0-rc4
|
||||
version = argv._[0];
|
||||
if (!version || version.indexOf(versionMajor) !== 0) {
|
||||
if (version.indexOf(versionMajor) !== 0) {
|
||||
echo(
|
||||
`You must pass a tag like 0.${versionMajor}.[X]-rc[Y] to bump a version`,
|
||||
`You must specify a version tag like 0.${versionMajor}.[X]-rc[Y] to bump a version`,
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Generate version files to detect mismatches between JS and native.
|
||||
let match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);
|
||||
if (!match) {
|
||||
echo(
|
||||
`You must pass a correctly formatted version; couldn't parse ${version}`,
|
||||
);
|
||||
let major,
|
||||
minor,
|
||||
patch,
|
||||
prerelease = -1;
|
||||
try {
|
||||
({major, minor, patch, prerelease} = parseVersion(version));
|
||||
} catch (e) {
|
||||
echo(e.message);
|
||||
exit(1);
|
||||
}
|
||||
let [, major, minor, patch, prerelease] = match;
|
||||
|
||||
fs.writeFileSync(
|
||||
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
|
||||
@@ -149,17 +160,26 @@ if (
|
||||
exec(`node scripts/set-rn-template-version.js ${version}`);
|
||||
|
||||
// Verify that files changed, we just do a git diff and check how many times version is added across files
|
||||
const filesToValidate = [
|
||||
'package.json',
|
||||
'ReactAndroid/gradle.properties',
|
||||
'template/package.json',
|
||||
];
|
||||
let numberOfChangedLinesWithNewVersion = exec(
|
||||
`git diff -U0 | grep '^[+]' | grep -c ${version} `,
|
||||
`git diff -U0 ${filesToValidate.join(
|
||||
' ',
|
||||
)}| grep '^[+]' | grep -c ${version} `,
|
||||
{silent: true},
|
||||
).stdout.trim();
|
||||
|
||||
// Release builds should commit the version bumps, and create tags.
|
||||
// Nightly builds do not need to do that.
|
||||
if (!nightlyBuild) {
|
||||
if (+numberOfChangedLinesWithNewVersion !== 3) {
|
||||
if (+numberOfChangedLinesWithNewVersion !== filesToValidate.length) {
|
||||
echo(
|
||||
'Failed to update all the files. package.json and gradle.properties must have versions in them',
|
||||
`Failed to update all the files: [${filesToValidate.join(
|
||||
', ',
|
||||
)}] must have versions in them`,
|
||||
);
|
||||
echo('Fix the issue, revert and try again');
|
||||
exec('git diff');
|
||||
@@ -186,8 +206,9 @@ if (!nightlyBuild) {
|
||||
let remote = argv.remote;
|
||||
exec(`git push ${remote} v${version}`);
|
||||
|
||||
// Tag latest if doing stable release
|
||||
if (version.indexOf('rc') === -1) {
|
||||
// Tag latest if doing stable release.
|
||||
// This will also tag npm release as `latest`
|
||||
if (prerelease == null && argv.latest) {
|
||||
exec('git tag -d latest');
|
||||
exec(`git push ${remote} :latest`);
|
||||
exec('git tag latest');
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Support Homebrew on M1
|
||||
HOMEBREW_M1_BIN=/opt/homebrew/bin
|
||||
if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
|
||||
export PATH="$HOMEBREW_M1_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# Define NVM_DIR and source the nvm.sh setup script
|
||||
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
|
||||
@@ -27,13 +27,14 @@ set -e
|
||||
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
|
||||
TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX)
|
||||
RN_DIR=$(cd "$THIS_DIR/.." && pwd)
|
||||
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
|
||||
USE_FABRIC="${USE_FABRIC:-0}"
|
||||
|
||||
# Find path to Node
|
||||
# shellcheck source=/dev/null
|
||||
source "$RN_DIR/scripts/find-node.sh"
|
||||
|
||||
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
|
||||
|
||||
cleanup () {
|
||||
set +e
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user