react-native 0.68.0 → 0.68.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +8 -2
- package/ReactAndroid/build.gradle +12 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/Android.mk +1 -0
- package/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/JSInterpreter.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +50 -30
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +15 -5
- package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/Android.mk +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +2 -1
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/Android.mk +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/Android.mk +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/Android.mk +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/Android.mk +1 -0
- package/ReactAndroid/src/main/jni/first-party/yogajni/Android.mk +1 -0
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +1 -59
- package/ReactAndroid/src/main/jni/react/jni/NativeTime.cpp +8 -2
- package/ReactAndroid/src/main/jni/third-party/boost/Android.mk +1 -0
- package/ReactCommon/butter/Android.mk +1 -0
- package/ReactCommon/cxxreact/Android.mk +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/executor/Android.mk +2 -0
- package/ReactCommon/hermes/inspector/Android.mk +1 -0
- package/ReactCommon/jsi/Android.mk +2 -0
- package/ReactCommon/jsiexecutor/Android.mk +1 -0
- package/ReactCommon/jsinspector/Android.mk +1 -0
- package/ReactCommon/logger/Android.mk +1 -0
- package/ReactCommon/react/config/Android.mk +1 -0
- package/ReactCommon/react/debug/Android.mk +1 -0
- package/ReactCommon/react/nativemodule/core/Android.mk +1 -0
- package/ReactCommon/react/nativemodule/samples/platform/android/Android.mk +1 -0
- package/ReactCommon/react/renderer/animations/Android.mk +1 -0
- package/ReactCommon/react/renderer/attributedstring/Android.mk +1 -0
- package/ReactCommon/react/renderer/componentregistry/Android.mk +1 -0
- package/ReactCommon/react/renderer/componentregistry/native/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/image/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/modal/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/progressbar/Android.mk +2 -1
- package/ReactCommon/react/renderer/components/root/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/scrollview/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/slider/Android.mk +2 -1
- package/ReactCommon/react/renderer/components/switch/Android.mk +2 -1
- package/ReactCommon/react/renderer/components/text/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/textinput/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/unimplementedview/Android.mk +1 -0
- package/ReactCommon/react/renderer/components/view/Android.mk +1 -0
- package/ReactCommon/react/renderer/core/Android.mk +1 -0
- package/ReactCommon/react/renderer/debug/Android.mk +1 -0
- package/ReactCommon/react/renderer/graphics/Android.mk +1 -0
- package/ReactCommon/react/renderer/imagemanager/Android.mk +1 -0
- package/ReactCommon/react/renderer/leakchecker/Android.mk +1 -0
- package/ReactCommon/react/renderer/mapbuffer/Android.mk +1 -0
- package/ReactCommon/react/renderer/mounting/Android.mk +1 -0
- package/ReactCommon/react/renderer/runtimescheduler/Android.mk +1 -0
- package/ReactCommon/react/renderer/scheduler/Android.mk +1 -0
- package/ReactCommon/react/renderer/telemetry/Android.mk +1 -0
- package/ReactCommon/react/renderer/templateprocessor/Android.mk +1 -0
- package/ReactCommon/react/renderer/textlayoutmanager/Android.mk +2 -1
- package/ReactCommon/react/renderer/uimanager/Android.mk +1 -0
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +7 -0
- package/ReactCommon/react/renderer/uimanager/primitives.h +10 -0
- package/ReactCommon/react/utils/Android.mk +1 -0
- package/ReactCommon/reactperflogger/Android.mk +1 -0
- package/ReactCommon/yoga/Android.mk +1 -0
- package/android/com/facebook/react/react-native/{0.68.0/react-native-0.68.0-sources.jar → 0.68.3/react-native-0.68.3-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3-sources.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.0/react-native-0.68.0.aar → 0.68.3/react-native-0.68.3.aar} +0 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.0/react-native-0.68.0.module → 0.68.3/react-native-0.68.3.module} +15 -15
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.module.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.module.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.module.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.module.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.0/react-native-0.68.0.pom → 0.68.3/react-native-0.68.3.pom} +1 -1
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.pom.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.3/react-native-0.68.3.pom.sha512 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
- package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
- package/package.json +4 -4
- package/template/Gemfile.lock +9 -9
- package/template/android/app/build.gradle +10 -0
- package/template/android/build.gradle +10 -1
- package/template/package.json +1 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0-sources.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0-sources.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.aar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.aar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.module.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.module.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.module.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.module.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.pom.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.pom.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.0/react-native-0.68.0.pom.sha512 +0 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -22,8 +22,14 @@ JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller(JSIExecutor::Runtim
|
|
|
22
22
|
bindNativeLogger(runtime, iosLoggingBinder);
|
|
23
23
|
|
|
24
24
|
PerformanceNow iosPerformanceNowBinder = []() {
|
|
25
|
-
auto time = std::chrono::
|
|
26
|
-
|
|
25
|
+
auto time = std::chrono::steady_clock::now();
|
|
26
|
+
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
|
|
27
|
+
time.time_since_epoch())
|
|
28
|
+
.count();
|
|
29
|
+
|
|
30
|
+
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
|
|
31
|
+
|
|
32
|
+
return duration / NANOSECONDS_IN_MILLISECOND;
|
|
27
33
|
};
|
|
28
34
|
bindNativePerformanceNow(runtime, iosPerformanceNowBinder);
|
|
29
35
|
|
|
@@ -281,10 +281,13 @@ task androidSourcesJar(type: Jar) {
|
|
|
281
281
|
android {
|
|
282
282
|
compileSdkVersion 31
|
|
283
283
|
|
|
284
|
-
// Used to override the NDK path
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
// Used to override the NDK path/version on internal CI or by allowing
|
|
285
|
+
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
|
286
|
+
if (rootProject.hasProperty("ndkPath")) {
|
|
287
|
+
ndkPath rootProject.ext.ndkPath
|
|
288
|
+
}
|
|
289
|
+
if (rootProject.hasProperty("ndkVersion")) {
|
|
290
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
288
291
|
}
|
|
289
292
|
|
|
290
293
|
defaultConfig {
|
|
@@ -318,6 +321,11 @@ android {
|
|
|
318
321
|
// This flag will suppress "fcntl(): Bad file descriptor" warnings on local builds.
|
|
319
322
|
arguments "--output-sync=none"
|
|
320
323
|
}
|
|
324
|
+
|
|
325
|
+
// Fix for windows limit on number of character in file paths and in command lines
|
|
326
|
+
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
327
|
+
arguments "NDK_APP_SHORT_COMMANDS=true"
|
|
328
|
+
}
|
|
321
329
|
}
|
|
322
330
|
}
|
|
323
331
|
ndk {
|
|
@@ -13,6 +13,7 @@ include $(CLEAR_VARS)
|
|
|
13
13
|
LOCAL_MODULE := jsijniprofiler
|
|
14
14
|
|
|
15
15
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
16
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
16
17
|
|
|
17
18
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include
|
|
18
19
|
|
|
@@ -12,6 +12,7 @@ include $(CLEAR_VARS)
|
|
|
12
12
|
LOCAL_MODULE := hermes-executor-release
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include
|
|
17
18
|
|
|
@@ -35,6 +36,7 @@ LOCAL_MODULE := hermes-executor-debug
|
|
|
35
36
|
LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1
|
|
36
37
|
|
|
37
38
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
39
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
38
40
|
|
|
39
41
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include
|
|
40
42
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package com.facebook.react;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An enum that specifies the JS Engine to be used in the app Old Logic uses the legacy code
|
|
12
|
+
* JSC/HERMES loads the respective engine using the revamped logic
|
|
13
|
+
*/
|
|
14
|
+
public enum JSInterpreter {
|
|
15
|
+
OLD_LOGIC,
|
|
16
|
+
JSC,
|
|
17
|
+
HERMES
|
|
18
|
+
}
|
|
@@ -66,6 +66,7 @@ public class ReactInstanceManagerBuilder {
|
|
|
66
66
|
private @Nullable Map<String, RequestHandler> mCustomPackagerCommandHandlers;
|
|
67
67
|
private @Nullable ReactPackageTurboModuleManagerDelegate.Builder mTMMDelegateBuilder;
|
|
68
68
|
private @Nullable SurfaceDelegateFactory mSurfaceDelegateFactory;
|
|
69
|
+
private JSInterpreter jsInterpreter = JSInterpreter.OLD_LOGIC;
|
|
69
70
|
|
|
70
71
|
/* package protected */ ReactInstanceManagerBuilder() {}
|
|
71
72
|
|
|
@@ -125,6 +126,31 @@ public class ReactInstanceManagerBuilder {
|
|
|
125
126
|
return this;
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Sets the jsEngine as JSC or HERMES as per the setJsEngineAsHermes call Uses the enum {@link
|
|
131
|
+
* JSInterpreter}
|
|
132
|
+
*
|
|
133
|
+
* @param jsInterpreter
|
|
134
|
+
*/
|
|
135
|
+
private void setJSEngine(JSInterpreter jsInterpreter) {
|
|
136
|
+
this.jsInterpreter = jsInterpreter;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Utility setter to set the required JSEngine as HERMES or JSC Defaults to OLD_LOGIC if not
|
|
141
|
+
* called by the host app
|
|
142
|
+
*
|
|
143
|
+
* @param hermesEnabled hermesEnabled = true sets the JS Engine as HERMES and JSC otherwise
|
|
144
|
+
*/
|
|
145
|
+
public ReactInstanceManagerBuilder setJsEngineAsHermes(boolean hermesEnabled) {
|
|
146
|
+
if (hermesEnabled) {
|
|
147
|
+
setJSEngine(JSInterpreter.HERMES);
|
|
148
|
+
} else {
|
|
149
|
+
setJSEngine(JSInterpreter.JSC);
|
|
150
|
+
}
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
|
|
128
154
|
/**
|
|
129
155
|
* Path to your app's main module on Metro. This is used when reloading JS during development. All
|
|
130
156
|
* paths are relative to the root folder the packager is serving files from. Examples: {@code
|
|
@@ -345,41 +371,35 @@ public class ReactInstanceManagerBuilder {
|
|
|
345
371
|
|
|
346
372
|
private JavaScriptExecutorFactory getDefaultJSExecutorFactory(
|
|
347
373
|
String appName, String deviceName, Context applicationContext) {
|
|
348
|
-
try {
|
|
349
|
-
// If JSC is included, use it as normal
|
|
350
|
-
initializeSoLoaderIfNecessary(applicationContext);
|
|
351
|
-
JSCExecutor.loadLibrary();
|
|
352
|
-
return new JSCExecutorFactory(appName, deviceName);
|
|
353
|
-
} catch (UnsatisfiedLinkError jscE) {
|
|
354
|
-
// https://github.com/facebook/hermes/issues/78 shows that
|
|
355
|
-
// people who aren't trying to use Hermes are having issues.
|
|
356
|
-
// https://github.com/facebook/react-native/issues/25923#issuecomment-554295179
|
|
357
|
-
// includes the actual JSC error in at least one case.
|
|
358
|
-
//
|
|
359
|
-
// So, if "__cxa_bad_typeid" shows up in the jscE exception
|
|
360
|
-
// message, then we will assume that's the failure and just
|
|
361
|
-
// throw now.
|
|
362
|
-
|
|
363
|
-
if (jscE.getMessage().contains("__cxa_bad_typeid")) {
|
|
364
|
-
throw jscE;
|
|
365
|
-
}
|
|
366
374
|
|
|
367
|
-
|
|
375
|
+
// Relying solely on try catch block and loading jsc even when
|
|
376
|
+
// project is using hermes can lead to launch-time crashes especially in
|
|
377
|
+
// monorepo architectures and hybrid apps using both native android
|
|
378
|
+
// and react native.
|
|
379
|
+
// So we can use the value of enableHermes received by the constructor
|
|
380
|
+
// to decide which library to load at launch
|
|
381
|
+
|
|
382
|
+
// if nothing is specified, use old loading method
|
|
383
|
+
// else load the required engine
|
|
384
|
+
if (jsInterpreter == JSInterpreter.OLD_LOGIC) {
|
|
368
385
|
try {
|
|
386
|
+
// If JSC is included, use it as normal
|
|
387
|
+
initializeSoLoaderIfNecessary(applicationContext);
|
|
388
|
+
JSCExecutor.loadLibrary();
|
|
389
|
+
return new JSCExecutorFactory(appName, deviceName);
|
|
390
|
+
} catch (UnsatisfiedLinkError jscE) {
|
|
391
|
+
if (jscE.getMessage().contains("__cxa_bad_typeid")) {
|
|
392
|
+
throw jscE;
|
|
393
|
+
}
|
|
369
394
|
HermesExecutor.loadLibrary();
|
|
370
395
|
return new HermesExecutorFactory();
|
|
371
|
-
} catch (UnsatisfiedLinkError hermesE) {
|
|
372
|
-
// If we get here, either this is a JSC build, and of course
|
|
373
|
-
// Hermes failed (since it's not in the APK), or it's a Hermes
|
|
374
|
-
// build, and Hermes had a problem.
|
|
375
|
-
|
|
376
|
-
// We suspect this is a JSC issue (it's the default), so we
|
|
377
|
-
// will throw that exception, but we will print hermesE first,
|
|
378
|
-
// since it could be a Hermes issue and we don't want to
|
|
379
|
-
// swallow that.
|
|
380
|
-
hermesE.printStackTrace();
|
|
381
|
-
throw jscE;
|
|
382
396
|
}
|
|
397
|
+
} else if (jsInterpreter == JSInterpreter.HERMES) {
|
|
398
|
+
HermesExecutor.loadLibrary();
|
|
399
|
+
return new HermesExecutorFactory();
|
|
400
|
+
} else {
|
|
401
|
+
JSCExecutor.loadLibrary();
|
|
402
|
+
return new JSCExecutorFactory(appName, deviceName);
|
|
383
403
|
}
|
|
384
404
|
}
|
|
385
405
|
}
|
|
@@ -719,12 +719,22 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
719
719
|
|
|
720
720
|
// React Native requires that the RootView id be managed entirely by React Native, and will
|
|
721
721
|
// crash in addRootView/startSurface if the native View id isn't set to NO_ID.
|
|
722
|
+
|
|
723
|
+
// This behavior can not be guaranteed in hybrid apps that have a native android layer over
|
|
724
|
+
// which reactRootViews are added and the native views need to have ids on them in order to
|
|
725
|
+
// work.
|
|
726
|
+
// Hence this can cause unnecessary crashes at runtime for hybrid apps.
|
|
727
|
+
// So converting this to a soft exception such that pure react-native devs can still see the
|
|
728
|
+
// warning while hybrid apps continue to run without crashes
|
|
729
|
+
|
|
722
730
|
if (getId() != View.NO_ID) {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
731
|
+
ReactSoftExceptionLogger.logSoftException(
|
|
732
|
+
TAG,
|
|
733
|
+
new IllegalViewOperationException(
|
|
734
|
+
"Trying to attach a ReactRootView with an explicit id already set to ["
|
|
735
|
+
+ getId()
|
|
736
|
+
+ "]. React Native uses the id field to track react tags and will overwrite this"
|
|
737
|
+
+ " field. If that is fine, explicitly overwrite the id field to View.NO_ID."));
|
|
728
738
|
}
|
|
729
739
|
|
|
730
740
|
try {
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := fabricjni
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_SHARED_LIBRARIES := \
|
|
15
16
|
libbutter \
|
|
@@ -39,7 +40,7 @@ LOCAL_SHARED_LIBRARIES := \
|
|
|
39
40
|
libreact_render_uimanager \
|
|
40
41
|
libreact_utils \
|
|
41
42
|
libreact_config \
|
|
42
|
-
|
|
43
|
+
libreactnativejni \
|
|
43
44
|
librrc_image \
|
|
44
45
|
librrc_root \
|
|
45
46
|
librrc_unimplementedview \
|
|
@@ -26,6 +26,7 @@ LOCAL_MODULE := reactperfloggerjni
|
|
|
26
26
|
|
|
27
27
|
# Compile all local c++ files
|
|
28
28
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/reactperflogger/*.cpp)
|
|
29
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
29
30
|
|
|
30
31
|
# Build the files in this directory as a shared library
|
|
31
32
|
include $(BUILD_SHARED_LIBRARY)
|
|
@@ -19,7 +19,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
|
19
19
|
|
|
20
20
|
LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall
|
|
21
21
|
|
|
22
|
-
LOCAL_SHARED_LIBRARIES = libfb libfbjni
|
|
22
|
+
LOCAL_SHARED_LIBRARIES = libfb libfbjni libreactnativejni libruntimeexecutor
|
|
23
23
|
|
|
24
24
|
LOCAL_STATIC_LIBRARIES = libcallinvoker libreactperfloggerjni
|
|
25
25
|
|
|
@@ -28,6 +28,7 @@ LOCAL_MODULE := callinvokerholder
|
|
|
28
28
|
|
|
29
29
|
# Compile all local c++ files
|
|
30
30
|
LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/CallInvokerHolder.cpp
|
|
31
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
31
32
|
|
|
32
33
|
# Build the files in this directory as a shared library
|
|
33
34
|
include $(BUILD_STATIC_LIBRARY)
|
|
@@ -56,6 +57,7 @@ LOCAL_STATIC_LIBRARIES = libcallinvokerholder libreactperfloggerjni
|
|
|
56
57
|
|
|
57
58
|
# Compile all local c++ files
|
|
58
59
|
LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/TurboModuleManager.cpp $(LOCAL_PATH)/ReactCommon/OnLoad.cpp
|
|
60
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
59
61
|
|
|
60
62
|
# Build the files in this directory as a shared library
|
|
61
63
|
include $(BUILD_SHARED_LIBRARY)
|
|
@@ -3,66 +3,8 @@
|
|
|
3
3
|
# This source code is licensed under the MIT license found in the
|
|
4
4
|
# LICENSE file in the root directory of this source tree.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
##########################
|
|
8
|
-
### React Native Utils ###
|
|
9
|
-
##########################
|
|
10
|
-
|
|
11
6
|
LOCAL_PATH := $(call my-dir)
|
|
12
7
|
|
|
13
|
-
include $(CLEAR_VARS)
|
|
14
|
-
|
|
15
|
-
# Include . in the header search path for all source files in this module.
|
|
16
|
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
17
|
-
|
|
18
|
-
# Include ./../../ in the header search path for modules that depend on
|
|
19
|
-
# reactnativejni. This will allow external modules to require this module's
|
|
20
|
-
# headers using #include <react/jni/<header>.h>, assuming:
|
|
21
|
-
# . == jni
|
|
22
|
-
# ./../ == react
|
|
23
|
-
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
24
|
-
|
|
25
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
26
|
-
|
|
27
|
-
LOCAL_LDLIBS += -landroid
|
|
28
|
-
|
|
29
|
-
# The dynamic libraries (.so files) that this module depends on.
|
|
30
|
-
LOCAL_SHARED_LIBRARIES := \
|
|
31
|
-
libfb \
|
|
32
|
-
libfbjni \
|
|
33
|
-
libfolly_json \
|
|
34
|
-
libglog_init \
|
|
35
|
-
libreact_render_runtimescheduler \
|
|
36
|
-
libruntimeexecutor \
|
|
37
|
-
libyoga
|
|
38
|
-
|
|
39
|
-
# The static libraries (.a files) that this module depends on.
|
|
40
|
-
LOCAL_STATIC_LIBRARIES := libreactnative libcallinvokerholder
|
|
41
|
-
|
|
42
|
-
# Name of this module.
|
|
43
|
-
#
|
|
44
|
-
# Other modules can depend on this one by adding libreactnativejni to their
|
|
45
|
-
# LOCAL_SHARED_LIBRARIES variable.
|
|
46
|
-
LOCAL_MODULE := reactnativeutilsjni
|
|
47
|
-
|
|
48
|
-
# Compile all local c++ files.
|
|
49
|
-
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
50
|
-
|
|
51
|
-
ifeq ($(APP_OPTIM),debug)
|
|
52
|
-
# Keep symbols by overriding the strip command invoked by ndk-build.
|
|
53
|
-
# Note that this will apply to all shared libraries,
|
|
54
|
-
# i.e. shared libraries will NOT be stripped
|
|
55
|
-
# even though we override it in this Android.mk
|
|
56
|
-
cmd-strip :=
|
|
57
|
-
endif
|
|
58
|
-
|
|
59
|
-
# Build the files in this directory as a shared library
|
|
60
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
8
|
######################
|
|
67
9
|
### reactnativejni ###
|
|
68
10
|
######################
|
|
@@ -90,7 +32,6 @@ LOCAL_SHARED_LIBRARIES := \
|
|
|
90
32
|
libfolly_json \
|
|
91
33
|
libglog_init \
|
|
92
34
|
libreact_render_runtimescheduler \
|
|
93
|
-
libreactnativeutilsjni \
|
|
94
35
|
libruntimeexecutor \
|
|
95
36
|
libyoga \
|
|
96
37
|
logger
|
|
@@ -106,6 +47,7 @@ LOCAL_MODULE := reactnativejni
|
|
|
106
47
|
|
|
107
48
|
# Compile all local c++ files.
|
|
108
49
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
50
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
109
51
|
|
|
110
52
|
ifeq ($(APP_OPTIM),debug)
|
|
111
53
|
# Keep symbols by overriding the strip command invoked by ndk-build.
|
|
@@ -12,8 +12,14 @@ namespace facebook {
|
|
|
12
12
|
namespace react {
|
|
13
13
|
|
|
14
14
|
double reactAndroidNativePerformanceNowHook() {
|
|
15
|
-
auto time = std::chrono::
|
|
16
|
-
|
|
15
|
+
auto time = std::chrono::steady_clock::now();
|
|
16
|
+
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
|
|
17
|
+
time.time_since_epoch())
|
|
18
|
+
.count();
|
|
19
|
+
|
|
20
|
+
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
|
|
21
|
+
|
|
22
|
+
return duration / NANOSECONDS_IN_MILLISECOND;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
} // namespace react
|
|
@@ -5,6 +5,7 @@ include $(CLEAR_VARS)
|
|
|
5
5
|
# because the react native version does not include anything outside of headers.
|
|
6
6
|
# They are required for Folly futures to compile successfully.
|
|
7
7
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/asm/$(TARGET_ARCH)/*.S)
|
|
8
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
8
9
|
|
|
9
10
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
|
|
10
11
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := reactnative
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
|
@@ -12,6 +12,7 @@ include $(CLEAR_VARS)
|
|
|
12
12
|
LOCAL_MODULE := hermes-executor-common-release
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include
|
|
17
18
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
@@ -27,6 +28,7 @@ LOCAL_MODULE := hermes-executor-common-debug
|
|
|
27
28
|
LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1
|
|
28
29
|
|
|
29
30
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
31
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
30
32
|
|
|
31
33
|
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include
|
|
32
34
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
@@ -12,6 +12,7 @@ include $(CLEAR_VARS)
|
|
|
12
12
|
LOCAL_MODULE := hermes-inspector
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp $(LOCAL_PATH)/detail/*.cpp $(LOCAL_PATH)/chrome/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_C_ROOT := $(LOCAL_PATH)/../..
|
|
17
18
|
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := jsi
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsi/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
@@ -25,6 +26,7 @@ include $(CLEAR_VARS)
|
|
|
25
26
|
LOCAL_MODULE := jscruntime
|
|
26
27
|
|
|
27
28
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
29
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
28
30
|
|
|
29
31
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
30
32
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := jsireact
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsireact/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := jsinspector
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := logger
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := react_config
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../
|
|
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_nativemodule_core
|
|
|
12
12
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../ $(LOCAL_PATH)/ReactCommon $(LOCAL_PATH)/platform/android/ReactCommon
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/ReactCommon/*.cpp) $(wildcard $(LOCAL_PATH)/platform/android/ReactCommon/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/platform/android/
|
|
17
18
|
|
|
@@ -9,6 +9,7 @@ include $(CLEAR_VARS)
|
|
|
9
9
|
LOCAL_MODULE := sampleturbomodule
|
|
10
10
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
11
11
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/ReactCommon/*.cpp)
|
|
12
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
12
13
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
13
14
|
LOCAL_SHARED_LIBRARIES := \
|
|
14
15
|
libfbjni \
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := react_render_animations
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := react_render_attributedstring
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
|
|
@@ -12,6 +12,7 @@ LOCAL_MODULE := react_render_componentregistry
|
|
|
12
12
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
|
|
17
18
|
|
|
@@ -12,6 +12,7 @@ LOCAL_MODULE := rrc_native
|
|
|
12
12
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../../
|
|
13
13
|
|
|
14
14
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
15
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
15
16
|
|
|
16
17
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
|
|
17
18
|
|
|
@@ -10,6 +10,7 @@ include $(CLEAR_VARS)
|
|
|
10
10
|
LOCAL_MODULE := rrc_image
|
|
11
11
|
|
|
12
12
|
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
13
|
+
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
13
14
|
|
|
14
15
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
|
|
15
16
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../../
|