mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use new JavaScriptCore from npm (#22231)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/22231 - Use clang instead of the deprecated gcc - Use libc++ instead of the deprecated gnustl - Updated gradle and android plugin version - Fixed missing arch in local-cli template - `clean` task should now always succeed - `clean` task deletes build artifacts - No need to specify buildToolsVersion. It's derived. - Elvis operator for more readable code Pull Request resolved: https://github.com/facebook/react-native/pull/22263 Reviewed By: hramos Differential Revision: D13004499 Pulled By: DanielZlotin fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
This commit is contained in:
committed by
Facebook Github Bot
parent
1d0404c4e8
commit
f3e5cce474
@@ -92,7 +92,6 @@ def enableProguardInReleaseBuilds = true
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion "28.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.facebook.react.uiapp"
|
applicationId "com.facebook.react.uiapp"
|
||||||
|
|||||||
+64
-60
@@ -26,7 +26,6 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
|
|||||||
// - double-conversion-1.1.6
|
// - double-conversion-1.1.6
|
||||||
// - folly-deprecate-dynamic-initializer
|
// - folly-deprecate-dynamic-initializer
|
||||||
// - glog-0.3.5
|
// - glog-0.3.5
|
||||||
// - jsc-headers
|
|
||||||
def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES")
|
def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES")
|
||||||
|
|
||||||
// The Boost library is a very large download (>100MB).
|
// The Boost library is a very large download (>100MB).
|
||||||
@@ -68,7 +67,7 @@ task prepareDoubleConversion(dependsOn: dependenciesPath ? [] : [downloadDoubleC
|
|||||||
from dependenciesPath ?: tarTree(downloadDoubleConversion.dest)
|
from dependenciesPath ?: tarTree(downloadDoubleConversion.dest)
|
||||||
from 'src/main/jni/third-party/double-conversion/Android.mk'
|
from 'src/main/jni/third-party/double-conversion/Android.mk'
|
||||||
include "double-conversion-${DOUBLE_CONVERSION_VERSION}/src/**/*", 'Android.mk'
|
include "double-conversion-${DOUBLE_CONVERSION_VERSION}/src/**/*", 'Android.mk'
|
||||||
filesMatching('*/src/**/*', {fname -> fname.path = "double-conversion/${fname.name}"})
|
filesMatching('*/src/**/*', { fname -> fname.path = "double-conversion/${fname.name}" })
|
||||||
includeEmptyDirs = false
|
includeEmptyDirs = false
|
||||||
into "$thirdPartyNdkDir/double-conversion"
|
into "$thirdPartyNdkDir/double-conversion"
|
||||||
}
|
}
|
||||||
@@ -84,17 +83,17 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy
|
|||||||
from dependenciesPath ?: tarTree(downloadFolly.dest)
|
from dependenciesPath ?: tarTree(downloadFolly.dest)
|
||||||
from 'src/main/jni/third-party/folly/Android.mk'
|
from 'src/main/jni/third-party/folly/Android.mk'
|
||||||
include "folly-${FOLLY_VERSION}/folly/**/*", 'Android.mk'
|
include "folly-${FOLLY_VERSION}/folly/**/*", 'Android.mk'
|
||||||
eachFile {fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/")}
|
eachFile { fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/") }
|
||||||
includeEmptyDirs = false
|
includeEmptyDirs = false
|
||||||
|
|
||||||
// Patch for folly build break on gcc 4.9 and could be removed after build by clang
|
// Patch for folly build break on gcc 4.9 and could be removed after build by clang
|
||||||
filesMatching('**/container/detail/F14Policy.h') {
|
filesMatching('**/container/detail/F14Policy.h') {
|
||||||
filter(ReplaceTokens, tokens: [
|
filter(ReplaceTokens, tokens: [
|
||||||
'ObjectHolder(Args&&... args) : value_{std::forward<Args>(args)...} {}': 'ObjectHolder(Args&&... args) : value_({std::forward<Args>(args)...}) {}',
|
'ObjectHolder(Args&&... args) : value_{std::forward<Args>(args)...} {}': 'ObjectHolder(Args&&... args) : value_({std::forward<Args>(args)...}) {}',
|
||||||
'ObjectHolder(Args&&... args) : T{std::forward<Args>(args)...} {}': 'ObjectHolder(Args&&... args) : T({std::forward<Args>(args)...}) {}',
|
'ObjectHolder(Args&&... args) : T{std::forward<Args>(args)...} {}' : 'ObjectHolder(Args&&... args) : T({std::forward<Args>(args)...}) {}',
|
||||||
],
|
],
|
||||||
beginToken: '',
|
beginToken: '',
|
||||||
endToken: '')
|
endToken: '')
|
||||||
}
|
}
|
||||||
|
|
||||||
into "$thirdPartyNdkDir/folly"
|
into "$thirdPartyNdkDir/folly"
|
||||||
@@ -116,20 +115,20 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
|
|||||||
includeEmptyDirs = false
|
includeEmptyDirs = false
|
||||||
filesMatching('**/*.h.in') {
|
filesMatching('**/*.h.in') {
|
||||||
filter(ReplaceTokens, tokens: [
|
filter(ReplaceTokens, tokens: [
|
||||||
ac_cv_have_unistd_h: '1',
|
ac_cv_have_unistd_h : '1',
|
||||||
ac_cv_have_stdint_h: '1',
|
ac_cv_have_stdint_h : '1',
|
||||||
ac_cv_have_systypes_h: '1',
|
ac_cv_have_systypes_h : '1',
|
||||||
ac_cv_have_inttypes_h: '1',
|
ac_cv_have_inttypes_h : '1',
|
||||||
ac_cv_have_libgflags: '0',
|
ac_cv_have_libgflags : '0',
|
||||||
ac_google_start_namespace: 'namespace google {',
|
ac_google_start_namespace : 'namespace google {',
|
||||||
ac_cv_have_uint16_t: '1',
|
ac_cv_have_uint16_t : '1',
|
||||||
ac_cv_have_u_int16_t: '1',
|
ac_cv_have_u_int16_t : '1',
|
||||||
ac_cv_have___uint16: '0',
|
ac_cv_have___uint16 : '0',
|
||||||
ac_google_end_namespace: '}',
|
ac_google_end_namespace : '}',
|
||||||
ac_cv_have___builtin_expect: '1',
|
ac_cv_have___builtin_expect : '1',
|
||||||
ac_google_namespace: 'google',
|
ac_google_namespace : 'google',
|
||||||
ac_cv___attribute___noinline: '__attribute__ ((noinline))',
|
ac_cv___attribute___noinline : '__attribute__ ((noinline))',
|
||||||
ac_cv___attribute___noreturn: '__attribute__ ((noreturn))',
|
ac_cv___attribute___noreturn : '__attribute__ ((noreturn))',
|
||||||
ac_cv___attribute___printf_4_5: '__attribute__((__format__ (__printf__, 4, 5)))'
|
ac_cv___attribute___printf_4_5: '__attribute__((__format__ (__printf__, 4, 5)))'
|
||||||
])
|
])
|
||||||
it.path = (it.name - '.in')
|
it.path = (it.name - '.in')
|
||||||
@@ -145,40 +144,41 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task downloadJSCHeaders(type: Download) {
|
task downloadJSC(dependsOn: createNativeDepsDirectories, type: Download) {
|
||||||
// in sync with webkit SVN revision 174650
|
src "https://registry.npmjs.org/jsc-android/-/jsc-android-${JSC_VERSION}.tgz"
|
||||||
def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/'
|
|
||||||
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
|
|
||||||
def output = new File(downloadsDir, 'jsc')
|
|
||||||
output.mkdirs()
|
|
||||||
src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" })
|
|
||||||
onlyIfNewer true
|
onlyIfNewer true
|
||||||
overwrite false
|
overwrite false
|
||||||
dest output
|
dest new File(downloadsDir, "jsc-${JSC_VERSION}.tar.gz")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org
|
// Create Android.mk library module based on jsc from npm
|
||||||
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) {
|
task prepareJSC(dependsOn: downloadJSC) << {
|
||||||
doLast {
|
def jscTar = tarTree(downloadJSC.dest)
|
||||||
copy {
|
def jscAAR = jscTar.matching({ it.include "**/android-jsc/**/*.aar" }).singleFile
|
||||||
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
|
def soFiles = zipTree(jscAAR).matching({ it.include "**/*.so" })
|
||||||
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
|
|
||||||
from 'src/main/jni/third-party/jsc'
|
def headerFiles = jscTar.matching({ it.include "**/include/*.h" })
|
||||||
include 'jni/**/*.so', '*.h', 'Android.mk'
|
|
||||||
filesMatching('*.h', { fname -> fname.path = "JavaScriptCore/${fname.path}"})
|
copy {
|
||||||
into "$thirdPartyNdkDir/jsc";
|
from soFiles
|
||||||
}
|
from headerFiles
|
||||||
|
from "src/main/jni/third-party/jsc/Android.mk"
|
||||||
|
|
||||||
|
filesMatching("**/*.h", { it.path = "JavaScriptCore/${it.name}"})
|
||||||
|
|
||||||
|
includeEmptyDirs false
|
||||||
|
into "$thirdPartyNdkDir/jsc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task downloadNdkBuildDependencies {
|
task downloadNdkBuildDependencies {
|
||||||
if (!boostPath) {
|
if (!boostPath) {
|
||||||
dependsOn downloadBoost
|
dependsOn downloadBoost
|
||||||
}
|
}
|
||||||
dependsOn downloadDoubleConversion
|
dependsOn downloadDoubleConversion
|
||||||
dependsOn downloadFolly
|
dependsOn downloadFolly
|
||||||
dependsOn downloadGlog
|
dependsOn downloadGlog
|
||||||
dependsOn downloadJSCHeaders
|
dependsOn downloadJSC
|
||||||
}
|
}
|
||||||
|
|
||||||
def getNdkBuildName() {
|
def getNdkBuildName() {
|
||||||
@@ -217,17 +217,17 @@ def getNdkBuildFullPath() {
|
|||||||
def ndkBuildFullPath = findNdkBuildFullPath()
|
def ndkBuildFullPath = findNdkBuildFullPath()
|
||||||
if (ndkBuildFullPath == null) {
|
if (ndkBuildFullPath == null) {
|
||||||
throw new GradleScriptException(
|
throw new GradleScriptException(
|
||||||
"ndk-build binary cannot be found, check if you've set " +
|
"ndk-build binary cannot be found, check if you've set " +
|
||||||
"\$ANDROID_NDK environment variable correctly or if ndk.dir is " +
|
"\$ANDROID_NDK environment variable correctly or if ndk.dir is " +
|
||||||
"setup in local.properties",
|
"setup in local.properties",
|
||||||
null)
|
null)
|
||||||
}
|
}
|
||||||
if (!new File(ndkBuildFullPath).canExecute()) {
|
if (!new File(ndkBuildFullPath).canExecute()) {
|
||||||
throw new GradleScriptException(
|
throw new GradleScriptException(
|
||||||
"ndk-build binary " + ndkBuildFullPath + " doesn't exist or isn't executable.\n" +
|
"ndk-build binary " + ndkBuildFullPath + " doesn't exist or isn't executable.\n" +
|
||||||
"Check that the \$ANDROID_NDK environment variable, or ndk.dir in local.properties, is set correctly.\n" +
|
"Check that the \$ANDROID_NDK environment variable, or ndk.dir in local.properties, is set correctly.\n" +
|
||||||
"(On Windows, make sure you escape backslashes in local.properties or use forward slashes, e.g. C:\\\\ndk or C:/ndk rather than C:\\ndk)",
|
"(On Windows, make sure you escape backslashes in local.properties or use forward slashes, e.g. C:\\\\ndk or C:/ndk rather than C:\\ndk)",
|
||||||
null)
|
null)
|
||||||
}
|
}
|
||||||
return ndkBuildFullPath
|
return ndkBuildFullPath
|
||||||
}
|
}
|
||||||
@@ -244,21 +244,27 @@ task buildReactNdkLib(dependsOn: [prepareJSC, prepareBoost, prepareDoubleConvers
|
|||||||
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
|
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
|
||||||
"REACT_SRC_DIR=$projectDir/src/main/java/com/facebook/react",
|
"REACT_SRC_DIR=$projectDir/src/main/java/com/facebook/react",
|
||||||
'-C', file('src/main/jni/react/jni').absolutePath,
|
'-C', file('src/main/jni/react/jni').absolutePath,
|
||||||
'--jobs', project.hasProperty("jobs") ? project.property("jobs") : Runtime.runtime.availableProcessors()
|
'--jobs', project.findProperty("jobs") ?: Runtime.runtime.availableProcessors()
|
||||||
}
|
}
|
||||||
|
|
||||||
task cleanReactNdkLib(type: Exec) {
|
task cleanReactNdkLib(type: Exec) {
|
||||||
|
ignoreExitValue true
|
||||||
|
errorOutput new ByteArrayOutputStream()
|
||||||
commandLine getNdkBuildFullPath(),
|
commandLine getNdkBuildFullPath(),
|
||||||
"NDK_APPLICATION_MK=$projectDir/src/main/jni/Application.mk",
|
"NDK_APPLICATION_MK=$projectDir/src/main/jni/Application.mk",
|
||||||
"THIRD_PARTY_NDK_DIR=$buildDir/third-party-ndk",
|
"THIRD_PARTY_NDK_DIR=$buildDir/third-party-ndk",
|
||||||
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
|
"REACT_COMMON_DIR=$projectDir/../ReactCommon",
|
||||||
'-C', file('src/main/jni/react/jni').absolutePath,
|
'-C', file('src/main/jni/react/jni').absolutePath,
|
||||||
'clean'
|
'clean'
|
||||||
|
doLast {
|
||||||
|
file(AAR_OUTPUT_URL).delete()
|
||||||
|
println "Deleted aar output dir at ${file(AAR_OUTPUT_URL)}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) {
|
task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) {
|
||||||
from "$buildDir/react-ndk/all"
|
from "$buildDir/react-ndk/all"
|
||||||
exclude '**/libjsc.so'
|
from "$thirdPartyNdkDir/jsc/jni"
|
||||||
into "$buildDir/react-ndk/exported"
|
into "$buildDir/react-ndk/exported"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +275,6 @@ task packageReactNdkLibsForBuck(dependsOn: packageReactNdkLibs, type: Copy) {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion "28.0.2"
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
@@ -291,7 +296,7 @@ android {
|
|||||||
|
|
||||||
sourceSets.main {
|
sourceSets.main {
|
||||||
jni.srcDirs = []
|
jni.srcDirs = []
|
||||||
jniLibs.srcDirs = ["$buildDir/react-ndk/exported", 'src/main/jni/third-party/jsc/jni']
|
jniLibs.srcDir "$buildDir/react-ndk/exported"
|
||||||
res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell', 'src/main/res/views/modal', 'src/main/res/views/uimanager']
|
res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell', 'src/main/res/views/modal', 'src/main/res/views/uimanager']
|
||||||
java {
|
java {
|
||||||
srcDirs = ['src/main/java', 'src/main/libraries/soloader/java', 'src/main/jni/first-party/fb/jni/java']
|
srcDirs = ['src/main/java', 'src/main/libraries/soloader/java', 'src/main/jni/first-party/fb/jni/java']
|
||||||
@@ -326,7 +331,6 @@ dependencies {
|
|||||||
api "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
|
api "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
|
||||||
api "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}"
|
api "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}"
|
||||||
api 'com.squareup.okio:okio:1.14.0'
|
api 'com.squareup.okio:okio:1.14.0'
|
||||||
compile 'org.webkit:android-jsc:r174650'
|
|
||||||
|
|
||||||
testImplementation "junit:junit:${JUNIT_VERSION}"
|
testImplementation "junit:junit:${JUNIT_VERSION}"
|
||||||
testImplementation "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}"
|
testImplementation "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}"
|
||||||
|
|||||||
@@ -19,3 +19,4 @@ BOOST_VERSION=1_63_0
|
|||||||
DOUBLE_CONVERSION_VERSION=1.1.6
|
DOUBLE_CONVERSION_VERSION=1.1.6
|
||||||
FOLLY_VERSION=2018.10.22.00
|
FOLLY_VERSION=2018.10.22.00
|
||||||
GLOG_VERSION=0.3.5
|
GLOG_VERSION=0.3.5
|
||||||
|
JSC_VERSION=236355.1.1
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
|
|
||||||
|
ext {
|
||||||
|
AAR_OUTPUT_URL = "file://${projectDir}/../android"
|
||||||
|
}
|
||||||
|
|
||||||
// Gradle tasks for publishing to maven
|
// Gradle tasks for publishing to maven
|
||||||
// 1) To install in local maven repo use :installArchives task
|
// 1) To install in local maven repo use :installArchives task
|
||||||
// 2) To upload artifact to maven central use: :uploadArchives (you'd need to have the permission to do that)
|
// 2) To upload artifact to maven central use: :uploadArchives (you'd need to have the permission to do that)
|
||||||
@@ -15,15 +19,15 @@ def isReleaseBuild() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getRepositoryUrl() {
|
def getRepositoryUrl() {
|
||||||
return project.hasProperty('repositoryUrl') ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
return project.findProperty('repositoryUrl') ?: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||||
}
|
}
|
||||||
|
|
||||||
def getRepositoryUsername() {
|
def getRepositoryUsername() {
|
||||||
return project.hasProperty('repositoryUsername') ? property('repositoryUsername') : ''
|
return project.findProperty('repositoryUsername') ?: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
def getRepositoryPassword() {
|
def getRepositoryPassword() {
|
||||||
return project.hasProperty('repositoryPassword') ? property('repositoryPassword') : ''
|
return project.findProperty('repositoryPassword') ?: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
def configureReactNativePom(def pom) {
|
def configureReactNativePom(def pom) {
|
||||||
@@ -128,7 +132,7 @@ afterEvaluate { project ->
|
|||||||
configuration = configurations.archives
|
configuration = configurations.archives
|
||||||
repositories.mavenDeployer {
|
repositories.mavenDeployer {
|
||||||
// Deploy to react-native/android, ready to publish to npm
|
// Deploy to react-native/android, ready to publish to npm
|
||||||
repository url: "file://${projectDir}/../android"
|
repository url: AAR_OUTPUT_URL
|
||||||
|
|
||||||
configureReactNativePom pom
|
configureReactNativePom pom
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|||||||
# etc.) are defined inside build.gradle.
|
# etc.) are defined inside build.gradle.
|
||||||
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_SRC_DIR)
|
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_SRC_DIR)
|
||||||
|
|
||||||
APP_STL := gnustl_shared
|
APP_STL := c++_shared
|
||||||
|
|
||||||
# Make sure every shared lib includes a .note.gnu.build-id header
|
# Make sure every shared lib includes a .note.gnu.build-id header
|
||||||
APP_CFLAGS := -Wall -Werror
|
APP_CFLAGS := -Wall -Werror
|
||||||
APP_CPPFLAGS := -std=c++1y
|
APP_CPPFLAGS := -std=c++1y
|
||||||
APP_LDFLAGS := -Wl,--build-id
|
APP_LDFLAGS := -Wl,--build-id
|
||||||
|
|
||||||
NDK_TOOLCHAIN_VERSION := 4.9
|
NDK_TOOLCHAIN_VERSION := clang
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|||||||
# ./../ == react
|
# ./../ == react
|
||||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
||||||
|
|
||||||
LOCAL_CFLAGS += -fexceptions -frtti
|
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
||||||
|
|
||||||
LOCAL_LDLIBS += -landroid
|
LOCAL_LDLIBS += -landroid
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ FOLLY_FLAGS := \
|
|||||||
-DFOLLY_NO_CONFIG=1 \
|
-DFOLLY_NO_CONFIG=1 \
|
||||||
-DFOLLY_HAVE_CLOCK_GETTIME=1 \
|
-DFOLLY_HAVE_CLOCK_GETTIME=1 \
|
||||||
-DFOLLY_HAVE_MEMRCHR=1 \
|
-DFOLLY_HAVE_MEMRCHR=1 \
|
||||||
|
-DFOLLY_USE_LIBCPP=1
|
||||||
|
|
||||||
# If APP_PLATFORM in Application.mk targets android-23 above, please comment this line.
|
# If APP_PLATFORM in Application.mk targets android-23 above, please comment this line.
|
||||||
# NDK uses GNU style stderror_r() after API 23.
|
# NDK uses GNU style stderror_r() after API 23.
|
||||||
|
|||||||
+2
-1
@@ -23,7 +23,8 @@ LOCAL_CFLAGS += \
|
|||||||
-g \
|
-g \
|
||||||
-O2 \
|
-O2 \
|
||||||
-D_START_GOOGLE_NAMESPACE_="namespace google {" \
|
-D_START_GOOGLE_NAMESPACE_="namespace google {" \
|
||||||
-D_END_GOOGLE_NAMESPACE_="}"
|
-D_END_GOOGLE_NAMESPACE_="}" \
|
||||||
|
-DHAVE_PREAD=1
|
||||||
|
|
||||||
|
|
||||||
LOCAL_MODULE := glog
|
LOCAL_MODULE := glog
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
|||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
-DLOG_TAG=\"ReactNative\"
|
-DLOG_TAG=\"ReactNative\"
|
||||||
|
|
||||||
LOCAL_CFLAGS += -fexceptions -frtti
|
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := boost
|
LOCAL_STATIC_LIBRARIES := boost
|
||||||
LOCAL_SHARED_LIBRARIES := jsinspector libfolly_json glog
|
LOCAL_SHARED_LIBRARIES := jsinspector libfolly_json glog
|
||||||
|
|||||||
@@ -30,8 +30,3 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
|
||||||
gradleVersion = '4.7'
|
|
||||||
distributionUrl = distributionUrl.replace("bin", "all")
|
|
||||||
}
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Vendored
-5
@@ -1,8 +1,3 @@
|
|||||||
:: Copyright (c) 2015-present, Facebook, Inc.
|
|
||||||
::
|
|
||||||
:: This source code is licensed under the MIT license found in the
|
|
||||||
:: LICENSE file in the root directory of this source tree.
|
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ def enableProguardInReleaseBuilds = false
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.helloworld"
|
applicationId "com.helloworld"
|
||||||
@@ -109,7 +108,7 @@ android {
|
|||||||
reset()
|
reset()
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
enable enableSeparateBuildPerCPUArchitecture
|
||||||
universalApk false // If true, also generate a universal APK
|
universalApk false // If true, also generate a universal APK
|
||||||
include "armeabi-v7a", "x86", "arm64-v8a"
|
include "armeabi-v7a", "x86", "arm64-v8a", "x86-64"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -137,7 +136,7 @@ android {
|
|||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
// For each separate APK per architecture, set a unique version code as described here:
|
// For each separate APK per architecture, set a unique version code as described here:
|
||||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||||
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
|
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
def abi = output.getFilter(OutputFile.ABI)
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||||
output.versionCodeOverride =
|
output.versionCodeOverride =
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "28.0.2"
|
|
||||||
minSdkVersion = 16
|
minSdkVersion = 16
|
||||||
compileSdkVersion = 28
|
compileSdkVersion = 28
|
||||||
targetSdkVersion = 27
|
targetSdkVersion = 27
|
||||||
@@ -31,9 +30,3 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
|
||||||
gradleVersion = '4.7'
|
|
||||||
distributionUrl = distributionUrl.replace("bin", "all")
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user