react-native 0.82.0-nightly-20250821-0ef21bf8a → 0.82.0-nightly-20250822-646945c2f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +4 -0
- package/Libraries/Blob/URLSearchParams.js +2 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Share/Share.js +4 -0
- package/Libraries/Utilities/HMRClient.js +2 -0
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
- package/React/Base/RCTUtils.mm +3 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +6 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +9 -0
- package/ReactAndroid/api/ReactAndroid.api +1 -14
- package/ReactAndroid/build.gradle.kts +9 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +6 -10
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.kt +1 -9
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -7
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/OnBatchCompleteListener.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNativeJNISoLoader.kt +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHost.kt +0 -167
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +11 -21
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerfMonitorOverlayViewManager.kt +10 -9
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/PerfMonitorOverlayManager.kt +0 -10
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorDevHelper.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorEventDispatcher.kt +12 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorInspectorTarget.kt +11 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorInspectorTargetBinding.kt +16 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorUpdateListener.kt +20 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +1 -14
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostInspectorTarget.kt +26 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -15
- package/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactAndroid/src/main/jni/react/hermes/instrumentation/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/hermes/tooling/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +1 -1
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +13 -10
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +3 -18
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/executor/CMakeLists.txt +1 -1
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +1 -1
- package/ReactCommon/jsi/jsi/decorator.h +27 -0
- package/ReactCommon/jsi/jsi/jsi-inl.h +17 -0
- package/ReactCommon/jsi/jsi/jsi.cpp +31 -0
- package/ReactCommon/jsi/jsi/jsi.h +20 -0
- package/ReactCommon/jsi/jsi/test/testlib.cpp +59 -0
- package/ReactCommon/jsinspector-modern/PerfMonitorV2.cpp +14 -12
- package/ReactCommon/jsinspector-modern/PerfMonitorV2.h +5 -6
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +7 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +48 -30
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +7 -3
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +1 -9
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/performance/cdpmetrics/CdpMetricsReporter.cpp +23 -0
- package/ReactCommon/react/performance/cdpmetrics/CdpMetricsReporter.h +1 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +10 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporterListeners.h +3 -1
- package/ReactCommon/react/renderer/components/switch/iosswitch/react/renderer/components/switch/IOSSwitchShadowNode.mm +3 -1
- package/ReactCommon/react/renderer/components/text/TextShadowNode.h +1 -0
- package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/HostPlatformColor.h +4 -4
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +4 -4
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +2 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +4 -4
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.h +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +1 -1
- package/ReactCommon/react/renderer/mounting/Differentiator.cpp +4 -0
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +1 -1
- package/package.json +8 -8
- package/scripts/hermes/hermes-utils.js +12 -6
- package/sdks/hermes-engine/hermes-engine.podspec +12 -12
- package/sdks/hermes-engine/utils/build-apple-framework.sh +14 -14
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +3 -3
- package/sdks/hermes-engine/utils/build-ios-framework.sh +3 -3
- package/sdks/hermes-engine/utils/build-mac-framework.sh +1 -1
- package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +5 -5
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +8 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageLogger.kt +0 -20
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeArgumentsParseException.kt +0 -34
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/PerfMonitorV2Handler.kt +0 -24
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleListener.kt +0 -24
|
@@ -77,6 +77,8 @@ const ActionSheetIOS = {
|
|
|
77
77
|
callback: (buttonIndex: number) => void,
|
|
78
78
|
) {
|
|
79
79
|
invariant(
|
|
80
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
81
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
80
82
|
typeof options === 'object' && options !== null,
|
|
81
83
|
'Options must be a valid object',
|
|
82
84
|
);
|
|
@@ -162,6 +164,8 @@ const ActionSheetIOS = {
|
|
|
162
164
|
successCallback: Function | ((success: boolean, method: ?string) => void),
|
|
163
165
|
) {
|
|
164
166
|
invariant(
|
|
167
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
168
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
165
169
|
typeof options === 'object' && options !== null,
|
|
166
170
|
'Options must be a valid object',
|
|
167
171
|
);
|
|
@@ -18,6 +18,8 @@ export class URLSearchParams {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
constructor(params?: Record<string, string> | string | [string, string][]) {
|
|
21
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
22
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
21
23
|
if (params === null) {
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 82;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20250822-646945c2f';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<1f7876c0dc0b05685a730513dc410236>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
@@ -82,6 +82,8 @@ export function register(name: string, callback: () => ViewConfig): string {
|
|
|
82
82
|
typeof callback === 'function',
|
|
83
83
|
'View config getter callback for component `%s` must be a function (received `%s`)',
|
|
84
84
|
name,
|
|
85
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
86
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
85
87
|
callback === null ? 'null' : typeof callback,
|
|
86
88
|
);
|
|
87
89
|
viewConfigCallbacks.set(name, callback);
|
package/Libraries/Share/Share.js
CHANGED
|
@@ -83,6 +83,8 @@ class Share {
|
|
|
83
83
|
options?: ShareOptions = {},
|
|
84
84
|
): Promise<{action: string, activityType: ?string}> {
|
|
85
85
|
invariant(
|
|
86
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
87
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
86
88
|
typeof content === 'object' && content !== null,
|
|
87
89
|
'Content to share must be a valid object',
|
|
88
90
|
);
|
|
@@ -91,6 +93,8 @@ class Share {
|
|
|
91
93
|
'At least one of URL or message is required',
|
|
92
94
|
);
|
|
93
95
|
invariant(
|
|
96
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
97
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
94
98
|
typeof options === 'object' && options !== null,
|
|
95
99
|
'Options must be a valid object',
|
|
96
100
|
);
|
|
@@ -165,6 +165,8 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
165
165
|
// Moving to top gives errors due to NativeModules not being initialized
|
|
166
166
|
const DevLoadingView = require('./DevLoadingView').default;
|
|
167
167
|
|
|
168
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
169
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
168
170
|
const serverHost = port !== null && port !== '' ? `${host}:${port}` : host;
|
|
169
171
|
|
|
170
172
|
const serverScheme = scheme;
|
|
@@ -33,6 +33,8 @@ function deepFreezeAndThrowOnMutationInDev<T: {...} | Array<mixed>>(
|
|
|
33
33
|
if (__DEV__) {
|
|
34
34
|
if (
|
|
35
35
|
typeof object !== 'object' ||
|
|
36
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
37
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
36
38
|
object === null ||
|
|
37
39
|
Object.isFrozen(object) ||
|
|
38
40
|
Object.isSealed(object)
|
|
@@ -232,6 +232,8 @@ const WebSocketInterceptor = {
|
|
|
232
232
|
|
|
233
233
|
_arrayBufferToString(data: string): ArrayBuffer | string {
|
|
234
234
|
const value = base64.toByteArray(data).buffer;
|
|
235
|
+
/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
|
|
236
|
+
* roll out. See https://fburl.com/workplace/5whu3i34. */
|
|
235
237
|
if (value === undefined || value === null) {
|
|
236
238
|
return '(no value)';
|
|
237
239
|
}
|
package/React/Base/RCTUtils.mm
CHANGED
|
@@ -415,7 +415,9 @@ CGSize RCTSwitchSize(void)
|
|
|
415
415
|
static CGSize rctSwitchSize;
|
|
416
416
|
static dispatch_once_t onceToken;
|
|
417
417
|
dispatch_once(&onceToken, ^{
|
|
418
|
-
|
|
418
|
+
RCTUnsafeExecuteOnMainQueueSync(^{
|
|
419
|
+
rctSwitchSize = [UISwitch new].intrinsicContentSize;
|
|
420
|
+
});
|
|
419
421
|
});
|
|
420
422
|
return rctSwitchSize;
|
|
421
423
|
}
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(82),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20250822-646945c2f",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -277,6 +277,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableV
|
|
|
277
277
|
rt
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
|
+
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForScrollView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
281
|
+
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableViewRecyclingForScrollView(
|
|
282
|
+
rt
|
|
283
|
+
);
|
|
284
|
+
}
|
|
280
285
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
281
286
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableViewRecyclingForText(
|
|
282
287
|
rt
|
|
@@ -464,6 +469,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
|
|
|
464
469
|
methodMap_["enableResourceTimingAPI"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableResourceTimingAPI};
|
|
465
470
|
methodMap_["enableViewCulling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewCulling};
|
|
466
471
|
methodMap_["enableViewRecycling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling};
|
|
472
|
+
methodMap_["enableViewRecyclingForScrollView"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForScrollView};
|
|
467
473
|
methodMap_["enableViewRecyclingForText"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText};
|
|
468
474
|
methodMap_["enableViewRecyclingForView"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForView};
|
|
469
475
|
methodMap_["enableVirtualViewDebugFeatures"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableVirtualViewDebugFeatures};
|
|
@@ -365,6 +365,7 @@ public:
|
|
|
365
365
|
virtual bool enableResourceTimingAPI(jsi::Runtime &rt) = 0;
|
|
366
366
|
virtual bool enableViewCulling(jsi::Runtime &rt) = 0;
|
|
367
367
|
virtual bool enableViewRecycling(jsi::Runtime &rt) = 0;
|
|
368
|
+
virtual bool enableViewRecyclingForScrollView(jsi::Runtime &rt) = 0;
|
|
368
369
|
virtual bool enableViewRecyclingForText(jsi::Runtime &rt) = 0;
|
|
369
370
|
virtual bool enableViewRecyclingForView(jsi::Runtime &rt) = 0;
|
|
370
371
|
virtual bool enableVirtualViewDebugFeatures(jsi::Runtime &rt) = 0;
|
|
@@ -736,6 +737,14 @@ private:
|
|
|
736
737
|
return bridging::callFromJs<bool>(
|
|
737
738
|
rt, &T::enableViewRecycling, jsInvoker_, instance_);
|
|
738
739
|
}
|
|
740
|
+
bool enableViewRecyclingForScrollView(jsi::Runtime &rt) override {
|
|
741
|
+
static_assert(
|
|
742
|
+
bridging::getParameterCount(&T::enableViewRecyclingForScrollView) == 1,
|
|
743
|
+
"Expected enableViewRecyclingForScrollView(...) to have 1 parameters");
|
|
744
|
+
|
|
745
|
+
return bridging::callFromJs<bool>(
|
|
746
|
+
rt, &T::enableViewRecyclingForScrollView, jsInvoker_, instance_);
|
|
747
|
+
}
|
|
739
748
|
bool enableViewRecyclingForText(jsi::Runtime &rt) override {
|
|
740
749
|
static_assert(
|
|
741
750
|
bridging::getParameterCount(&T::enableViewRecyclingForText) == 1,
|
|
@@ -1018,10 +1018,6 @@ public abstract interface class com/facebook/react/bridge/NotThreadSafeBridgeIdl
|
|
|
1018
1018
|
public abstract fun onTransitionToBridgeIdle ()V
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
1021
|
-
public abstract interface class com/facebook/react/bridge/OnBatchCompleteListener {
|
|
1022
|
-
public abstract fun onBatchComplete ()V
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
1021
|
public abstract interface class com/facebook/react/bridge/PerformanceCounter {
|
|
1026
1022
|
public abstract fun getPerformanceCounters ()Ljava/util/Map;
|
|
1027
1023
|
public abstract fun profileNextBatch ()V
|
|
@@ -1863,15 +1859,9 @@ public class com/facebook/react/defaults/DefaultReactActivityDelegate : com/face
|
|
|
1863
1859
|
public final class com/facebook/react/defaults/DefaultReactHost {
|
|
1864
1860
|
public static final field INSTANCE Lcom/facebook/react/defaults/DefaultReactHost;
|
|
1865
1861
|
public static final fun getDefaultReactHost (Landroid/content/Context;Lcom/facebook/react/ReactNativeHost;Lcom/facebook/react/runtime/JSRuntimeFactory;)Lcom/facebook/react/ReactHost;
|
|
1866
|
-
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/runtime/JSRuntimeFactory;ZLjava/util/List;)Lcom/facebook/react/ReactHost;
|
|
1867
1862
|
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/runtime/JSRuntimeFactory;ZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;)Lcom/facebook/react/ReactHost;
|
|
1868
|
-
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;)Lcom/facebook/react/ReactHost;
|
|
1869
|
-
public static final fun getDefaultReactHost (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;)Lcom/facebook/react/ReactHost;
|
|
1870
1863
|
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Lcom/facebook/react/ReactNativeHost;Lcom/facebook/react/runtime/JSRuntimeFactory;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
|
1871
|
-
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/runtime/JSRuntimeFactory;ZLjava/util/List;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
|
1872
1864
|
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/runtime/JSRuntimeFactory;ZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
|
1873
|
-
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
|
1874
|
-
public static synthetic fun getDefaultReactHost$default (Landroid/content/Context;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/util/List;Lkotlin/jvm/functions/Function1;Lcom/facebook/react/runtime/BindingsInstaller;ILjava/lang/Object;)Lcom/facebook/react/ReactHost;
|
|
1875
1865
|
}
|
|
1876
1866
|
|
|
1877
1867
|
public abstract class com/facebook/react/defaults/DefaultReactNativeHost : com/facebook/react/ReactNativeHost {
|
|
@@ -1973,7 +1963,7 @@ public abstract interface class com/facebook/react/devsupport/DevServerHelper$Pa
|
|
|
1973
1963
|
public abstract fun onPackagerReloadCommand ()V
|
|
1974
1964
|
}
|
|
1975
1965
|
|
|
1976
|
-
public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/facebook/react/devsupport/interfaces/DevSupportManager
|
|
1966
|
+
public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/facebook/react/devsupport/interfaces/DevSupportManager {
|
|
1977
1967
|
public static final field Companion Lcom/facebook/react/devsupport/DevSupportManagerBase$Companion;
|
|
1978
1968
|
public fun <init> (Landroid/content/Context;Lcom/facebook/react/devsupport/ReactInstanceDevHelper;Ljava/lang/String;ZLcom/facebook/react/devsupport/interfaces/RedBoxHandler;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;ILjava/util/Map;Lcom/facebook/react/common/SurfaceDelegateFactory;Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;Lcom/facebook/react/devsupport/interfaces/PausedInDebuggerOverlayManager;)V
|
|
1979
1969
|
public fun addCustomDevOption (Ljava/lang/String;Lcom/facebook/react/devsupport/interfaces/DevOptionHandler;)V
|
|
@@ -2031,7 +2021,6 @@ public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/
|
|
|
2031
2021
|
public fun startInspector ()V
|
|
2032
2022
|
public fun stopInspector ()V
|
|
2033
2023
|
public fun toggleElementInspector ()V
|
|
2034
|
-
public fun unstable_updatePerfMonitor (Ljava/lang/String;III)V
|
|
2035
2024
|
}
|
|
2036
2025
|
|
|
2037
2026
|
public abstract interface class com/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader {
|
|
@@ -4369,7 +4358,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
|
|
|
4369
4358
|
public fun addRootView (Landroid/view/View;Lcom/facebook/react/bridge/WritableMap;)I
|
|
4370
4359
|
public fun addUIBlock (Lcom/facebook/react/uimanager/UIBlock;)V
|
|
4371
4360
|
public fun addUIManagerEventListener (Lcom/facebook/react/bridge/UIManagerListener;)V
|
|
4372
|
-
public fun addUIManagerListener (Lcom/facebook/react/uimanager/UIManagerModuleListener;)V
|
|
4373
4361
|
public fun clearJSResponder ()V
|
|
4374
4362
|
public fun configureNextLayoutAnimation (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
|
|
4375
4363
|
public static fun createConstants (Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
|
|
@@ -4406,7 +4394,6 @@ public class com/facebook/react/uimanager/UIManagerModule : com/facebook/react/b
|
|
|
4406
4394
|
public fun receiveEvent (ILjava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V
|
|
4407
4395
|
public fun removeRootView (I)V
|
|
4408
4396
|
public fun removeUIManagerEventListener (Lcom/facebook/react/bridge/UIManagerListener;)V
|
|
4409
|
-
public fun removeUIManagerListener (Lcom/facebook/react/uimanager/UIManagerModuleListener;)V
|
|
4410
4397
|
public fun resolveCustomDirectEventName (Ljava/lang/String;)Ljava/lang/String;
|
|
4411
4398
|
public fun resolveRootTagFromReactTag (I)I
|
|
4412
4399
|
public fun resolveView (I)Landroid/view/View;
|
|
@@ -74,7 +74,14 @@ val GLOG_VERSION = libs.versions.glog.get()
|
|
|
74
74
|
|
|
75
75
|
val preparePrefab by
|
|
76
76
|
tasks.registering(PreparePrefabHeadersTask::class) {
|
|
77
|
-
dependsOn(
|
|
77
|
+
dependsOn(
|
|
78
|
+
prepareBoost,
|
|
79
|
+
prepareDoubleConversion,
|
|
80
|
+
prepareFastFloat,
|
|
81
|
+
prepareFmt,
|
|
82
|
+
prepareFolly,
|
|
83
|
+
prepareGlog,
|
|
84
|
+
)
|
|
78
85
|
dependsOn("generateCodegenArtifactsFromSchema")
|
|
79
86
|
// To export to a ReactNativePrefabProcessingEntities.kt once all
|
|
80
87
|
// libraries have been moved. We keep it here for now as it make easier to
|
|
@@ -616,7 +623,7 @@ android {
|
|
|
616
623
|
// we produce. The reason behind this is that we want to allow users to pick the
|
|
617
624
|
// JS engine by specifying a dependency on either `hermes-engine` or other engines
|
|
618
625
|
// that will include the necessary .so files to load.
|
|
619
|
-
jniLibs.excludes.add("**/
|
|
626
|
+
jniLibs.excludes.add("**/libhermesvm.so")
|
|
620
627
|
}
|
|
621
628
|
|
|
622
629
|
buildFeatures {
|
|
@@ -122,7 +122,8 @@ val unzipHermes by
|
|
|
122
122
|
// NOTE: ideally, we would like CMake to be installed automatically by the `externalNativeBuild`
|
|
123
123
|
// below. To do that, we would need the various `ConfigureCMake*` tasks to run *before*
|
|
124
124
|
// `configureBuildForHermes` and `buildHermesC` so that CMake is available for their run. But the
|
|
125
|
-
// `ConfigureCMake*` tasks depend upon the `
|
|
125
|
+
// `ConfigureCMake*` tasks depend upon the `ImportHostCompilers.cmake` file which is actually
|
|
126
|
+
// generated by
|
|
126
127
|
// the two tasks mentioned before, so we install CMake manually to break the circular dependency.
|
|
127
128
|
|
|
128
129
|
val installCMake by
|
|
@@ -197,7 +198,7 @@ val buildHermesLib by
|
|
|
197
198
|
"--build",
|
|
198
199
|
hermesBuildDir.toString(),
|
|
199
200
|
"--target",
|
|
200
|
-
"
|
|
201
|
+
"hermesvm",
|
|
201
202
|
"-j",
|
|
202
203
|
ndkBuildJobs,
|
|
203
204
|
)
|
|
@@ -258,7 +259,7 @@ android {
|
|
|
258
259
|
"-DANDROID_STL=c++_shared",
|
|
259
260
|
"-DANDROID_PIE=True",
|
|
260
261
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
|
|
261
|
-
"-
|
|
262
|
+
"-DIMPORT_HOST_COMPILERS=${File(hermesBuildDir, "ImportHostCompilers.cmake").toString()}",
|
|
262
263
|
"-DJSI_DIR=${jsiDir}",
|
|
263
264
|
"-DHERMES_BUILD_SHARED_JSI=True",
|
|
264
265
|
"-DHERMES_RELEASE_VERSION=for RN ${version}",
|
|
@@ -268,7 +269,7 @@ android {
|
|
|
268
269
|
"-DHERMES_ENABLE_INTL=True",
|
|
269
270
|
)
|
|
270
271
|
|
|
271
|
-
targets("
|
|
272
|
+
targets("hermesvm")
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
ndk { abiFilters.addAll(reactNativeArchitectures()) }
|
|
@@ -346,12 +347,7 @@ android {
|
|
|
346
347
|
}
|
|
347
348
|
}
|
|
348
349
|
|
|
349
|
-
prefab {
|
|
350
|
-
create("libhermes") {
|
|
351
|
-
headers = prefabHeadersDir.absolutePath
|
|
352
|
-
libraryName = "libhermes"
|
|
353
|
-
}
|
|
354
|
-
}
|
|
350
|
+
prefab { create("hermesvm") { headers = prefabHeadersDir.absolutePath } }
|
|
355
351
|
}
|
|
356
352
|
|
|
357
353
|
afterEvaluate {
|
|
@@ -29,8 +29,8 @@ public class HermesExecutor internal constructor(enableDebugger: Boolean, debugg
|
|
|
29
29
|
@Throws(UnsatisfiedLinkError::class)
|
|
30
30
|
public fun loadLibrary() {
|
|
31
31
|
if (mode == null) {
|
|
32
|
-
//
|
|
33
|
-
SoLoader.loadLibrary("
|
|
32
|
+
// libhermesvm must be loaded explicitly to invoke its JNI_OnLoad.
|
|
33
|
+
SoLoader.loadLibrary("hermesvm")
|
|
34
34
|
SoLoader.loadLibrary("hermes_executor")
|
|
35
35
|
// libhermes_executor is built differently for Debug & Release so we load the proper mode.
|
|
36
36
|
mode = if (ReactBuildConfig.DEBUG) "Debug" else "Release"
|
|
@@ -66,7 +66,7 @@ internal class CoreModulesPackage(
|
|
|
66
66
|
private val hardwareBackBtnHandler: DefaultHardwareBackBtnHandler,
|
|
67
67
|
private val lazyViewManagersEnabled: Boolean,
|
|
68
68
|
private val minTimeLeftInFrameForNonBatchedOperationMs: Int,
|
|
69
|
-
) : BaseReactPackage()
|
|
69
|
+
) : BaseReactPackage() {
|
|
70
70
|
/**
|
|
71
71
|
* This method is overridden, since OSS does not run the annotation processor to generate
|
|
72
72
|
* [CoreModulesPackage.ReactModuleInfoProvider] class. Here we check if it exists with the method
|
|
@@ -196,14 +196,6 @@ internal class CoreModulesPackage(
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
override fun startProcessPackage() {
|
|
200
|
-
ReactMarker.logMarker(ReactMarkerConstants.PROCESS_CORE_REACT_PACKAGE_START)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
override fun endProcessPackage() {
|
|
204
|
-
ReactMarker.logMarker(ReactMarkerConstants.PROCESS_CORE_REACT_PACKAGE_END)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
199
|
private companion object {
|
|
208
200
|
init {
|
|
209
201
|
LegacyArchitectureLogger.assertLegacyArchitecture(
|
|
@@ -1570,14 +1570,7 @@ public class ReactInstanceManager {
|
|
|
1570
1570
|
SystraceMessage.beginSection(TRACE_TAG_REACT, "processPackage")
|
|
1571
1571
|
.arg("className", reactPackage.getClass().getSimpleName())
|
|
1572
1572
|
.flush();
|
|
1573
|
-
if (reactPackage instanceof ReactPackageLogger) {
|
|
1574
|
-
((ReactPackageLogger) reactPackage).startProcessPackage();
|
|
1575
|
-
}
|
|
1576
1573
|
nativeModuleRegistryBuilder.processPackage(reactPackage);
|
|
1577
|
-
|
|
1578
|
-
if (reactPackage instanceof ReactPackageLogger) {
|
|
1579
|
-
((ReactPackageLogger) reactPackage).endProcessPackage();
|
|
1580
|
-
}
|
|
1581
1574
|
SystraceMessage.endSection(TRACE_TAG_REACT).flush();
|
|
1582
1575
|
}
|
|
1583
1576
|
|
|
@@ -189,7 +189,7 @@ internal class JavaMethodWrapper(
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
if (jsArgumentsNeeded != parameters.size()) {
|
|
192
|
-
throw
|
|
192
|
+
throw JSApplicationCausedNativeException(
|
|
193
193
|
"$traceName got ${parameters.size()} arguments, expected $jsArgumentsNeeded"
|
|
194
194
|
)
|
|
195
195
|
}
|
|
@@ -208,7 +208,7 @@ internal class JavaMethodWrapper(
|
|
|
208
208
|
i++
|
|
209
209
|
}
|
|
210
210
|
} catch (e: UnexpectedNativeTypeException) {
|
|
211
|
-
throw
|
|
211
|
+
throw JSApplicationCausedNativeException(
|
|
212
212
|
"${e.message} (constructing arguments for $traceName at argument index ${
|
|
213
213
|
getAffectedRange(
|
|
214
214
|
jsArgumentsConsumed,
|
|
@@ -218,7 +218,7 @@ internal class JavaMethodWrapper(
|
|
|
218
218
|
e,
|
|
219
219
|
)
|
|
220
220
|
} catch (e: NullPointerException) {
|
|
221
|
-
throw
|
|
221
|
+
throw JSApplicationCausedNativeException(
|
|
222
222
|
"${e.message} (constructing arguments for $traceName at argument index ${
|
|
223
223
|
getAffectedRange(
|
|
224
224
|
jsArgumentsConsumed,
|
|
@@ -16,6 +16,6 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
|
|
|
16
16
|
message = "This class is part of Legacy Architecture and will be removed in a future release",
|
|
17
17
|
level = DeprecationLevel.WARNING,
|
|
18
18
|
)
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
internal fun interface OnBatchCompleteListener {
|
|
20
|
+
fun onBatchComplete()
|
|
21
21
|
}
|
|
@@ -35,50 +35,6 @@ import java.lang.Exception
|
|
|
35
35
|
public object DefaultReactHost {
|
|
36
36
|
private var reactHost: ReactHost? = null
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Util function to create a default [ReactHost] to be used in your application. This method is
|
|
40
|
-
* used by the New App template.
|
|
41
|
-
*
|
|
42
|
-
* @param context the Android [Context] to use for creating the [ReactHost]
|
|
43
|
-
* @param packageList the list of [ReactPackage]s to use for creating the [ReactHost]
|
|
44
|
-
* @param jsMainModulePath the path to your app's main module on Metro. Usually `index` or
|
|
45
|
-
* `index.<platform>`
|
|
46
|
-
* @param jsBundleAssetPath the path to the JS bundle relative to the assets directory. Will be
|
|
47
|
-
* composed in a `asset://...` URL
|
|
48
|
-
* @param jsBundleFilePath the path to the JS bundle on the filesystem. Will be composed in a
|
|
49
|
-
* `file://...` URL
|
|
50
|
-
* @param jsRuntimeFactory the JS engine to use for executing [ReactHost], default to Hermes.
|
|
51
|
-
* @param useDevSupport whether to enable dev support, default to ReactBuildConfig.DEBUG.
|
|
52
|
-
* @param cxxReactPackageProviders a list of cxxreactpackage providers (to register c++ turbo
|
|
53
|
-
* modules)
|
|
54
|
-
*
|
|
55
|
-
* TODO(T186951312): Should this be @UnstableReactNativeAPI?
|
|
56
|
-
*/
|
|
57
|
-
@OptIn(UnstableReactNativeAPI::class)
|
|
58
|
-
@JvmStatic
|
|
59
|
-
public fun getDefaultReactHost(
|
|
60
|
-
context: Context,
|
|
61
|
-
packageList: List<ReactPackage>,
|
|
62
|
-
jsMainModulePath: String = "index",
|
|
63
|
-
jsBundleAssetPath: String = "index",
|
|
64
|
-
jsBundleFilePath: String? = null,
|
|
65
|
-
jsRuntimeFactory: JSRuntimeFactory? = null,
|
|
66
|
-
useDevSupport: Boolean = ReactBuildConfig.DEBUG,
|
|
67
|
-
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(),
|
|
68
|
-
): ReactHost =
|
|
69
|
-
getDefaultReactHost(
|
|
70
|
-
context,
|
|
71
|
-
packageList,
|
|
72
|
-
jsMainModulePath,
|
|
73
|
-
jsBundleAssetPath,
|
|
74
|
-
jsBundleFilePath,
|
|
75
|
-
jsRuntimeFactory,
|
|
76
|
-
useDevSupport,
|
|
77
|
-
cxxReactPackageProviders,
|
|
78
|
-
{ throw it },
|
|
79
|
-
null,
|
|
80
|
-
)
|
|
81
|
-
|
|
82
38
|
/**
|
|
83
39
|
* Util function to create a default [ReactHost] to be used in your application. This method is
|
|
84
40
|
* used by the New App template.
|
|
@@ -154,129 +110,6 @@ public object DefaultReactHost {
|
|
|
154
110
|
return reactHost as ReactHost
|
|
155
111
|
}
|
|
156
112
|
|
|
157
|
-
/**
|
|
158
|
-
* Util function to create a default [ReactHost] to be used in your application. This method is
|
|
159
|
-
* used by the New App template.
|
|
160
|
-
*
|
|
161
|
-
* @param context the Android [Context] to use for creating the [ReactHost]
|
|
162
|
-
* @param packageList the list of [ReactPackage]s to use for creating the [ReactHost]
|
|
163
|
-
* @param jsMainModulePath the path to your app's main module on Metro. Usually `index` or
|
|
164
|
-
* `index.<platform>`
|
|
165
|
-
* @param jsBundleAssetPath the path to the JS bundle relative to the assets directory. Will be
|
|
166
|
-
* composed in a `asset://...` URL
|
|
167
|
-
* @param jsBundleFilePath the path to the JS bundle on the filesystem. Will be composed in a
|
|
168
|
-
* `file://...` URL
|
|
169
|
-
* @param isHermesEnabled whether to use Hermes as the JS engine, default to true.
|
|
170
|
-
* @param useDevSupport whether to enable dev support, default to ReactBuildConfig.DEBUG.
|
|
171
|
-
* @param cxxReactPackageProviders a list of cxxreactpackage providers (to register c++ turbo
|
|
172
|
-
* modules)
|
|
173
|
-
* @param exceptionHandler Callback that can be used by React Native host applications to react to
|
|
174
|
-
* exceptions thrown by the internals of React Native.
|
|
175
|
-
* @param bindingsInstaller that can be used for installing bindings.
|
|
176
|
-
*/
|
|
177
|
-
@Deprecated(
|
|
178
|
-
message = "Use `getDefaultReactHost` with `jsRuntimeFactory` instead",
|
|
179
|
-
replaceWith =
|
|
180
|
-
ReplaceWith(
|
|
181
|
-
"""
|
|
182
|
-
fun getDefaultReactHost(
|
|
183
|
-
context: Context,
|
|
184
|
-
packageList: List<ReactPackage>,
|
|
185
|
-
jsMainModulePath: String,
|
|
186
|
-
jsBundleAssetPath: String,
|
|
187
|
-
jsBundleFilePath: String?,
|
|
188
|
-
jsRuntimeFactory: JSRuntimeFactory?,
|
|
189
|
-
useDevSupport: Boolean,
|
|
190
|
-
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage>,
|
|
191
|
-
exceptionHandler: (Exception) -> Unit,
|
|
192
|
-
bindingsInstaller: BindingsInstaller?,
|
|
193
|
-
): ReactHost
|
|
194
|
-
"""
|
|
195
|
-
),
|
|
196
|
-
)
|
|
197
|
-
@JvmStatic
|
|
198
|
-
public fun getDefaultReactHost(
|
|
199
|
-
context: Context,
|
|
200
|
-
packageList: List<ReactPackage>,
|
|
201
|
-
jsMainModulePath: String = "index",
|
|
202
|
-
jsBundleAssetPath: String = "index",
|
|
203
|
-
jsBundleFilePath: String? = null,
|
|
204
|
-
isHermesEnabled: Boolean = true,
|
|
205
|
-
useDevSupport: Boolean = ReactBuildConfig.DEBUG,
|
|
206
|
-
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(),
|
|
207
|
-
exceptionHandler: (Exception) -> Unit = { throw it },
|
|
208
|
-
bindingsInstaller: BindingsInstaller? = null,
|
|
209
|
-
): ReactHost =
|
|
210
|
-
getDefaultReactHost(
|
|
211
|
-
context,
|
|
212
|
-
packageList,
|
|
213
|
-
jsMainModulePath,
|
|
214
|
-
jsBundleAssetPath,
|
|
215
|
-
jsBundleFilePath,
|
|
216
|
-
HermesInstance(),
|
|
217
|
-
useDevSupport,
|
|
218
|
-
cxxReactPackageProviders,
|
|
219
|
-
exceptionHandler,
|
|
220
|
-
bindingsInstaller,
|
|
221
|
-
)
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Util function to create a default [ReactHost] to be used in your application. This method is
|
|
225
|
-
* used by the New App template.
|
|
226
|
-
*
|
|
227
|
-
* @param context the Android [Context] to use for creating the [ReactHost]
|
|
228
|
-
* @param packageList the list of [ReactPackage]s to use for creating the [ReactHost]
|
|
229
|
-
* @param jsMainModulePath the path to your app's main module on Metro. Usually `index` or
|
|
230
|
-
* `index.<platform>`
|
|
231
|
-
* @param jsBundleAssetPath the path to the JS bundle relative to the assets directory. Will be
|
|
232
|
-
* composed in a `asset://...` URL
|
|
233
|
-
* @param jsBundleFilePath the path to the JS bundle on the filesystem. Will be composed in a
|
|
234
|
-
* `file://...` URL
|
|
235
|
-
* @param isHermesEnabled whether to use Hermes as the JS engine, default to true.
|
|
236
|
-
* @param useDevSupport whether to enable dev support, default to ReactBuildConfig.DEBUG.
|
|
237
|
-
* @param cxxReactPackageProviders a list of cxxreactpackage providers (to register c++ turbo
|
|
238
|
-
* modules)
|
|
239
|
-
*/
|
|
240
|
-
@Deprecated(
|
|
241
|
-
message = "Use `getDefaultReactHost` with `jsRuntimeFactory` instead",
|
|
242
|
-
replaceWith =
|
|
243
|
-
ReplaceWith(
|
|
244
|
-
"""
|
|
245
|
-
fun getDefaultReactHost(
|
|
246
|
-
context: Context,
|
|
247
|
-
packageList: List<ReactPackage>,
|
|
248
|
-
jsMainModulePath: String,
|
|
249
|
-
jsBundleAssetPath: String,
|
|
250
|
-
jsBundleFilePath: String?,
|
|
251
|
-
jsRuntimeFactory: JSRuntimeFactory?,
|
|
252
|
-
useDevSupport: Boolean,
|
|
253
|
-
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage>,
|
|
254
|
-
): ReactHost
|
|
255
|
-
"""
|
|
256
|
-
),
|
|
257
|
-
)
|
|
258
|
-
@JvmStatic
|
|
259
|
-
public fun getDefaultReactHost(
|
|
260
|
-
context: Context,
|
|
261
|
-
packageList: List<ReactPackage>,
|
|
262
|
-
jsMainModulePath: String = "index",
|
|
263
|
-
jsBundleAssetPath: String = "index",
|
|
264
|
-
jsBundleFilePath: String? = null,
|
|
265
|
-
isHermesEnabled: Boolean = true,
|
|
266
|
-
useDevSupport: Boolean = ReactBuildConfig.DEBUG,
|
|
267
|
-
cxxReactPackageProviders: List<(ReactContext) -> CxxReactPackage> = emptyList(),
|
|
268
|
-
): ReactHost =
|
|
269
|
-
getDefaultReactHost(
|
|
270
|
-
context,
|
|
271
|
-
packageList,
|
|
272
|
-
jsMainModulePath,
|
|
273
|
-
jsBundleAssetPath,
|
|
274
|
-
jsBundleFilePath,
|
|
275
|
-
HermesInstance(),
|
|
276
|
-
useDevSupport,
|
|
277
|
-
cxxReactPackageProviders,
|
|
278
|
-
)
|
|
279
|
-
|
|
280
113
|
/**
|
|
281
114
|
* Util function to create a default [ReactHost] to be used in your application. This method is
|
|
282
115
|
* used by the New App template.
|