RNTester Android: generate Fabric JNI files during build time

Summary:
Generate Fabric C++ files along side TM spec files for RNTester. The combined .so then has both TM and Fabric files.

This commit also removed the checked-in JNI files.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D25674313

fbshipit-source-id: 8091d5a00f42849a74cab50e8d24f4010d500e5b
This commit is contained in:
Kevin Gozali authored and Facebook GitHub Bot committed 2020-12-21 22:43:35 -08:00
1 parent 1ce53e86ed
commit 8db181abfc
21 files changed
+120 -1341

No files matched your search

@@ -61,6 +61,7 @@ std::shared_ptr<TurboModule> ${libraryName}_ModuleProvider(const std::string mod
`;
};
// Note: this Android.mk template includes dependencies for both NativeModule and components.
const AndroidMkTemplate = ({libraryName}: $ReadOnly<{libraryName: string}>) => {
return `# Copyright (c) Facebook, Inc. and its affiliates.
#
@@ -71,15 +72,15 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ${libraryName}
LOCAL_MODULE := react_codegen_${libraryName}
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/react/renderer/components/${libraryName}/*.cpp)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/${libraryName}
LOCAL_SHARED_LIBRARIES := libreact_nativemodule_core
LOCAL_SHARED_LIBRARIES := libglog libfolly_json libyoga libreact_nativemodule_core libreact_render_components_view libreact_render_core libreact_render_graphics
LOCAL_STATIC_LIBRARIES := libjsi
@@ -122,7 +123,7 @@ module.exports = {
[
'jni/Android.mk',
AndroidMkTemplate({
libraryName: `react_codegen_${libraryName.toLowerCase()}`,
libraryName: `${libraryName.toLowerCase()}`,
}),
],
]);