mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Compile out the legacy runtime
Summary: Compile out the legacy c++ core from android. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D72991984 fbshipit-source-id: 56bb6ca1c4797adb9235e982121712b11e85e109
This commit is contained in:
1 parent
fd29d68c16
commit
ad88309843
12 files changed
+46
No files matched your search
@@ -36,6 +36,8 @@
|
||||
#include "JniJSModulesUnbundle.h"
|
||||
#include "NativeArray.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
using namespace facebook::jni;
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -419,3 +421,5 @@ void CatalystInstanceImpl::unregisterFromInspector() {
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ModuleRegistryBuilder.h"
|
||||
#include "ReactInstanceManagerInspectorTarget.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class Instance;
|
||||
@@ -125,3 +127,5 @@ class CatalystInstanceImpl : public jni::HybridClass<CatalystInstanceImpl> {
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "CatalystInstanceImpl.h"
|
||||
#include "ReadableNativeArray.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
using facebook::xplat::module::CxxModule;
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -152,3 +154,5 @@ jni::local_ref<JReflectMethod::javaobject> JMethodDescriptor::getMethod()
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "MethodInvoker.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class Instance;
|
||||
@@ -85,3 +87,5 @@ class JavaNativeModule : public NativeModule {
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <cxxreact/JSExecutor.h>
|
||||
#include <fbjni/fbjni.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class JavaScriptExecutorHolder
|
||||
@@ -31,3 +33,5 @@ class JavaScriptExecutorHolder
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -17,6 +17,8 @@
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
using magic_number_t = uint32_t;
|
||||
const magic_number_t MAGIC_FILE_HEADER = 0xFB0BD1E5;
|
||||
const char* MAGIC_FILE_NAME = "UNBUNDLE";
|
||||
@@ -94,3 +96,5 @@ JSModulesUnbundle::Module JniJSModulesUnbundle::getModule(
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <android/asset_manager.h>
|
||||
#include <cxxreact/JSModulesUnbundle.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class JniJSModulesUnbundle : public JSModulesUnbundle {
|
||||
@@ -41,3 +43,5 @@ class JniJSModulesUnbundle : public JSModulesUnbundle {
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "WritableNativeArray.h"
|
||||
#include "WritableNativeMap.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
using namespace facebook::jni;
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -309,3 +311,5 @@ MethodCallResult MethodInvoker::invoke(
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <fbjni/fbjni.h>
|
||||
#include <folly/dynamic.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class Instance;
|
||||
@@ -62,3 +64,5 @@ class MethodInvoker {
|
||||
};
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
#include <cxxreact/CxxNativeModule.h>
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
std::string ModuleHolder::getName() const {
|
||||
@@ -68,3 +70,5 @@ std::vector<std::unique_ptr<NativeModule>> buildNativeModuleList(
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "CxxModuleWrapper.h"
|
||||
#include "JavaModuleWrapper.h"
|
||||
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
class MessageQueueThread;
|
||||
@@ -36,3 +38,5 @@ std::vector<std::unique_ptr<NativeModule>> buildNativeModuleList(
|
||||
cxxModules,
|
||||
std::shared_ptr<MessageQueueThread> moduleMessageQueue);
|
||||
} // namespace facebook::react
|
||||
|
||||
#endif
|
||||
@@ -39,7 +39,9 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
gloginit::initialize();
|
||||
FLAGS_minloglevel = 0;
|
||||
#endif
|
||||
#ifndef RCT_FIT_RM_OLD_RUNTIME
|
||||
CatalystInstanceImpl::registerNatives();
|
||||
#endif
|
||||
CxxModuleWrapperBase::registerNatives();
|
||||
JInspector::registerNatives();
|
||||
ReactInstanceManagerInspectorTarget::registerNatives();
|
||||
|
||||
Reference in new issue
Block a user