Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ def reactNativeArchitectures() {
}

tasks.register("packageReactNdkLibsForBuck") {
dependsOn("packageReactNdkDebugLibsForBuck")
}

tasks.register("packageReactNdkDebugLibsForBuck", Copy) {
dependsOn("mergeDebugNativeLibs")
// Shared libraries (.so) are copied from the merged_native_libs folder instead
from("$buildDir/intermediates/merged_native_libs/debug/out/lib/")
Expand All @@ -351,21 +347,6 @@ tasks.register("packageReactNdkDebugLibsForBuck", Copy) {
into("src/main/jni/prebuilt/lib")
}

tasks.register("packageReactNdkReleaseLibsForBuck", Copy) {
dependsOn("mergeReleaseNativeLibs")
// Shared libraries (.so) are copied from the merged_native_libs folder instead
from("$buildDir/intermediates/merged_native_libs/release/out/lib/")
exclude("**/libjsc.so")
exclude("**/libhermes.so")
into("src/main/jni/prebuilt/lib")
}

final def extractNativeDependencies = tasks.register('extractNativeDependencies', ExtractJniAndHeadersTask) {
it.extractHeadersConfiguration.setFrom(configurations.extractHeaders)
it.extractJniConfiguration.setFrom(configurations.extractJNI)
it.baseOutputDir = project.file("src/main/jni/first-party/")
}

task installArchives {
dependsOn("publishAllPublicationsToNpmRepository")
}
Expand Down Expand Up @@ -464,7 +445,7 @@ android {
}
}

preBuild.dependsOn(prepareJSC, prepareBoost, prepareDoubleConversion, prepareFmt, prepareFolly, prepareGlog, prepareLibevent, extractNativeDependencies)
preBuild.dependsOn(prepareJSC, prepareBoost, prepareDoubleConversion, prepareFmt, prepareFolly, prepareGlog, prepareLibevent)
preBuild.dependsOn("generateCodegenArtifactsFromSchema")
preBuild.dependsOn(preparePrefab)

Expand Down Expand Up @@ -492,11 +473,6 @@ android {
exclude("**/libjsc.so")
}

configurations {
extractHeaders
extractJNI
}

buildFeatures {
prefab true
prefabPublishing !skipPrefabPublishing
Expand Down Expand Up @@ -571,7 +547,7 @@ dependencies {
api("androidx.swiperefreshlayout:swiperefreshlayout:${SWIPEREFRESH_LAYOUT_VERSION}")
api("androidx.tracing:tracing:${ANDROIDX_TRACING_VERSION}")

api("com.facebook.fbjni:fbjni-java-only:${FBJNI_VERSION}")
api("com.facebook.fbjni:fbjni:${FBJNI_VERSION}")
api("com.facebook.fresco:fresco:${FRESCO_VERSION}")
api("com.facebook.fresco:imagepipeline-okhttp3:${FRESCO_VERSION}")
api("com.facebook.fresco:ui-common:${FRESCO_VERSION}")
Expand All @@ -585,9 +561,6 @@ dependencies {
api("com.squareup.okio:okio:${OKIO_VERSION}")
api("javax.inject:javax.inject:${JAVAX_INJECT_VERSION}")

extractHeaders("com.facebook.fbjni:fbjni:${FBJNI_VERSION}:headers")
extractJNI("com.facebook.fbjni:fbjni:${FBJNI_VERSION}")

// It's up to the consumer to decide if hermes should be included or not.
// Therefore hermes-engine is a compileOnly dependency.
compileOnly(project(":ReactAndroid:hermes-engine"))
Expand Down
64 changes: 0 additions & 64 deletions ReactAndroid/cmake-utils/Android-prebuilt.cmake

This file was deleted.

13 changes: 9 additions & 4 deletions ReactAndroid/cmake-utils/ReactNative-application.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ set(CMAKE_VERBOSE_MAKEFILE on)

include(${CMAKE_CURRENT_LIST_DIR}/folly-flags.cmake)

# We configured the REACT_COMMON_DIR variable as it's commonly used to reference
# shared C++ code in other targets.
set(REACT_COMMON_DIR ${REACT_ANDROID_DIR}/../ReactCommon)

# If you have ccache installed, we're going to honor it.
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)

include(${REACT_ANDROID_DIR}/cmake-utils/Android-prebuilt.cmake)

file(GLOB input_SRC CONFIGURE_DEPENDS
*.cpp
${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/*.cpp)
Expand All @@ -41,7 +43,7 @@ target_include_directories(${CMAKE_PROJECT_NAME}

target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Werror -fexceptions -frtti -std=c++17 -DWITH_INSPECTOR=1 -DLOG_TAG=\"ReactNative\")

# Prefab packages
# Prefab packages from React Native
find_package(ReactAndroid REQUIRED CONFIG)
add_library(react_render_debug ALIAS ReactAndroid::react_render_debug)
add_library(turbomodulejsijni ALIAS ReactAndroid::turbomodulejsijni)
Expand All @@ -60,10 +62,13 @@ add_library(react_render_mapbuffer ALIAS ReactAndroid::react_render_mapbuffer)
add_library(yoga ALIAS ReactAndroid::yoga)
add_library(folly_runtime ALIAS ReactAndroid::folly_runtime)
add_library(react_nativemodule_core ALIAS ReactAndroid::react_nativemodule_core)
# 3rd party prefab packages
find_package(fbjni REQUIRED CONFIG)
add_library(fbjni ALIAS fbjni::fbjni)

target_link_libraries(${CMAKE_PROJECT_NAME}
fabricjni # prefab ready
fbjni
fbjni # via 3rd party prefab
folly_runtime # prefab ready
glog # prefab ready
jsi # prefab ready
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ endfunction()

# Third-party prefabs
find_package(hermes-engine REQUIRED CONFIG)
find_package(fbjni REQUIRED CONFIG)
add_library(fbjni ALIAS fbjni::fbjni)

# Third-party downloaded targets
add_react_third_party_ndk_subdir(glog)
Expand Down Expand Up @@ -96,7 +98,6 @@ add_react_common_subdir(react/nativemodule/core)

# ReactAndroid JNI targets
add_react_build_subdir(generated/source/codegen/jni)
add_react_android_subdir(src/main/jni/first-party/fbjni)
add_react_android_subdir(src/main/jni/first-party/fb)
add_react_android_subdir(src/main/jni/first-party/fbgloginit)
add_react_android_subdir(src/main/jni/first-party/yogajni)
Expand Down
2 changes: 0 additions & 2 deletions ReactAndroid/src/main/jni/first-party/fbjni/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions ReactAndroid/src/main/jni/first-party/fbjni/Android.mk

This file was deleted.

15 changes: 0 additions & 15 deletions ReactAndroid/src/main/jni/first-party/fbjni/CMakeLists.txt

This file was deleted.

This file was deleted.

This file was deleted.

Loading