This commit is contained in:
Ranesh Saha 2022-08-29 14:39:32 -07:00
Родитель 85f269f6c2
Коммит 21de264eea
1 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle
index 3c23c6a84b4..df345f87eab 100644
index cae7d90ada9..f14559c03a8 100644
--- a/ReactAndroid/build.gradle
+++ b/ReactAndroid/build.gradle
@@ -12,6 +12,10 @@ plugins {
@ -60,7 +60,7 @@ index 3c23c6a84b4..df345f87eab 100644
task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
src("https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz")
onlyIfNewer(true)
@@ -315,6 +340,7 @@ android {
@@ -312,6 +337,7 @@ android {
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
"REACT_GENERATED_SRC_DIR=$buildDir/generated/source",
"REACT_SRC_DIR=$projectDir/src/main/java/com/facebook/react",
@ -68,7 +68,7 @@ index 3c23c6a84b4..df345f87eab 100644
"-j${ndkBuildJobs()}"
if (Os.isFamily(Os.FAMILY_MAC)) {
@@ -339,7 +365,7 @@ android {
@@ -331,7 +357,7 @@ android {
}
}
@ -77,17 +77,13 @@ index 3c23c6a84b4..df345f87eab 100644
preBuild.dependsOn("generateCodegenArtifactsFromSchema")
sourceSets.main {
@@ -363,8 +389,12 @@ android {
// we produce. The reason behind this is that we want to allow users to pick the
// JS engine by specifying a dependency on either `hermes-engine` or `android-jsc`
// that will include the necessary .so files to load.
- exclude("**/libhermes.so")
- exclude("**/libjsc.so")
@@ -351,6 +377,10 @@ android {
packagingOptions {
exclude("META-INF/NOTICE")
exclude("META-INF/LICENSE")
+
+ if (project.hasProperty('param') ? project.property('param').equals("excludeLibs") : false) {
+ exclude '**/*.so'
+ } else {
+ exclude("**/libhermes.so")
+ exclude("**/libjsc.so")
+ }
}