Exclude Fabric from RN OSS by default
Summary: This diff adds a new mechanism to enable or disable the build of Fabric in RN OSS changelog: [internal] internal Reviewed By: fkgozali Differential Revision: D23084586 fbshipit-source-id: b7b0b842486392ec4ccb91ad1e6441ba3a1f48b2
This commit is contained in:
Родитель
03cc849e30
Коммит
9d33b588f6
|
@ -33,6 +33,11 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
|
|||
// - glog-0.3.5
|
||||
def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES")
|
||||
|
||||
// The 'USE_FABRIC' environment variable will build Fabric C++ code into the bundle
|
||||
// USE_FABRIC=false will build RN excluding fabric
|
||||
// USE_FABRIC=true will build RN including fabric
|
||||
def enableFabric = System.getenv("USE_FABRIC") ?: "false"
|
||||
|
||||
// The Boost library is a very large download (>100MB).
|
||||
// If Boost is already present on your system, define the REACT_NATIVE_BOOST_PATH env variable
|
||||
// and the build will use that.
|
||||
|
@ -312,6 +317,7 @@ def buildReactNdkLib = tasks.register("buildReactNdkLib", Exec) {
|
|||
"THIRD_PARTY_NDK_DIR=$buildDir/third-party-ndk",
|
||||
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
|
||||
"REACT_SRC_DIR=$projectDir/src/main/java/com/facebook/react",
|
||||
"BUILD_FABRIC=$enableFabric",
|
||||
"-C", file("src/main/jni/react/jni").absolutePath,
|
||||
"--jobs", project.findProperty("jobs") ?: Runtime.runtime.availableProcessors()
|
||||
)
|
||||
|
|
|
@ -77,7 +77,7 @@ LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|||
LOCAL_LDLIBS += -landroid
|
||||
|
||||
# The dynamic libraries (.so files) that this module depends on.
|
||||
LOCAL_SHARED_LIBRARIES := libreactnativeutilsjni libfolly_json libfb libfbjni libglog_init libyoga libfabricjni
|
||||
LOCAL_SHARED_LIBRARIES := libreactnativeutilsjni libfolly_json libfb libfbjni libglog_init libyoga
|
||||
|
||||
# The static libraries (.a files) that this module depends on.
|
||||
LOCAL_STATIC_LIBRARIES := libreactnative libcallinvokerholder libruntimeexecutor
|
||||
|
@ -131,7 +131,10 @@ $(call import-module,runtimeexecutor)
|
|||
|
||||
include $(REACT_SRC_DIR)/reactperflogger/jni/Android.mk
|
||||
include $(REACT_SRC_DIR)/turbomodule/core/jni/Android.mk
|
||||
include $(REACT_SRC_DIR)/fabric/jni/Android.mk
|
||||
|
||||
ifeq ($(BUILD_FABRIC),true)
|
||||
include $(REACT_SRC_DIR)/fabric/jni/Android.mk
|
||||
endif
|
||||
|
||||
# TODO(ramanpreet):
|
||||
# Why doesn't this import-module call generate a jscexecutor.so file?
|
||||
|
|
Загрузка…
Ссылка в новой задаче