diff --git a/.circleci/config.yml b/.circleci/config.yml index 185be9135eb451..623f097f486568 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,11 +59,11 @@ aliases: - &restore-cache-ndk keys: - - v3-android-ndk-{{ arch }}-r10e-{{ checksum "scripts/android-setup.sh" }} + - v3-android-ndk-{{ arch }}-r16-{{ checksum "scripts/android-setup.sh" }} - &save-cache-ndk paths: - /opt/ndk - key: v3-android-ndk-{{ arch }}-r10e-{{ checksum "scripts/android-setup.sh" }} + key: v3-android-ndk-{{ arch }}-r16-{{ checksum "scripts/android-setup.sh" }} - &restore-cache-buck keys: @@ -322,7 +322,7 @@ android_defaults: &android_defaults - ADB_INSTALL_TIMEOUT: 10 - _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" - GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"' - - ANDROID_NDK: '/opt/ndk/android-ndk-r10e' + - ANDROID_NDK: '/opt/ndk/android-ndk-r16' - BUILD_THREADS: 2 macos_defaults: &macos_defaults diff --git a/ContainerShip/Dockerfile.android b/ContainerShip/Dockerfile.android index ab311060b2c328..c9b12018d7a5b8 100644 --- a/ContainerShip/Dockerfile.android +++ b/ContainerShip/Dockerfile.android @@ -42,7 +42,7 @@ ADD build.gradle /app/build.gradle ADD react.gradle /app/react.gradle # run gradle downloads -RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders +RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders :ReactAndroid:downloadJSC # compile native libs with Gradle script, we need bridge for unit and integration tests RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1 -Pcom.android.build.threadPoolSize=1 diff --git a/ContainerShip/Dockerfile.android-base b/ContainerShip/Dockerfile.android-base index b630b396e9599d..3646096fe9f260 100644 --- a/ContainerShip/Dockerfile.android-base +++ b/ContainerShip/Dockerfile.android-base @@ -21,7 +21,7 @@ ARG SDK_VERSION=sdk-tools-linux-3859397.zip ARG ANDROID_BUILD_VERSION=26 ARG ANDROID_TOOLS_VERSION=26.0.3 ARG BUCK_VERSION=v2018.03.26.01 -ARG NDK_VERSION=10e +ARG NDK_VERSION=16 ARG NODE_VERSION=8.10.0 ARG WATCHMAN_VERSION=4.9.0 diff --git a/RNTester/android/app/build.gradle b/RNTester/android/app/build.gradle index 5e5503b5eb7ca6..b80af150aab195 100644 --- a/RNTester/android/app/build.gradle +++ b/RNTester/android/app/build.gradle @@ -34,6 +34,10 @@ import com.android.build.OutputFile * // the root of your project, i.e. where "package.json" lives * root: "../../", * + * // path to react cli commands + * // IMPORTANT: this path is relative to the defined 'root' + * cliPath: "node_modules/react-native/local-cli/cli.js" + * * // where to put the JS bundle asset in debug mode * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * @@ -76,7 +80,7 @@ apply from: "../../../react.gradle" * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */ -def enableSeparateBuildPerCPUArchitecture = false +def enableSeparateBuildPerCPUArchitecture = true /** * Run Proguard to shrink the Java bytecode in release builds. @@ -93,9 +97,6 @@ android { targetSdkVersion 23 versionCode 1 versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } } signingConfigs { release { @@ -110,7 +111,7 @@ android { enable enableSeparateBuildPerCPUArchitecture universalApk false reset() - include "armeabi-v7a", "x86" + include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } buildTypes { @@ -125,7 +126,7 @@ android { variant.outputs.each { output -> // 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 - def versionCodes = ["armeabi-v7a":1, "x86":2] + def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = diff --git a/RNTester/android/app/gradle.properties b/RNTester/android/app/gradle.properties index 04cbf4f74219c9..429da27598e37f 100644 --- a/RNTester/android/app/gradle.properties +++ b/RNTester/android/app/gradle.properties @@ -1,4 +1,3 @@ -android.useDeprecatedNdk=true org.gradle.parallel=true org.gradle.configureondemand=true MYAPP_RELEASE_STORE_FILE=my-release-key.keystore diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index aa23d8898c0fe9..489d082954f1f0 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -22,9 +22,9 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") // You need to have following folders in this directory: // - boost_1_63_0 -// - double-conversion-1.1.1 +// - double-conversion-1.1.6 // - folly-deprecate-dynamic-initializer -// - glog-0.3.3 +// - glog-0.3.5 // - jsc-headers def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES") @@ -57,16 +57,16 @@ task prepareBoost(dependsOn: boostPath ? [] : [downloadBoost], type: Copy) { } task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) { - src 'https://github.com/google/double-conversion/archive/v1.1.1.tar.gz' + src 'https://github.com/google/double-conversion/archive/v1.1.6.tar.gz' onlyIfNewer true overwrite false - dest new File(downloadsDir, 'double-conversion-1.1.1.tar.gz') + dest new File(downloadsDir, 'double-conversion-1.1.6.tar.gz') } task prepareDoubleConversion(dependsOn: dependenciesPath ? [] : [downloadDoubleConversion], type: Copy) { from dependenciesPath ?: tarTree(downloadDoubleConversion.dest) from 'src/main/jni/third-party/double-conversion/Android.mk' - include 'double-conversion-1.1.1/src/**/*', 'Android.mk' + include 'double-conversion-1.1.6/src/**/*', 'Android.mk' filesMatching('*/src/**/*', {fname -> fname.path = "double-conversion/${fname.name}"}) includeEmptyDirs = false into "$thirdPartyNdkDir/double-conversion" @@ -89,10 +89,10 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy } task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) { - src 'https://github.com/google/glog/archive/v0.3.3.tar.gz' + src 'https://github.com/google/glog/archive/v0.3.5.tar.gz' onlyIfNewer true overwrite false - dest new File(downloadsDir, 'glog-0.3.3.tar.gz') + dest new File(downloadsDir, 'glog-0.3.5.tar.gz') } // Prepare glog sources to be compiled, this task will perform steps that normally should've been @@ -100,7 +100,7 @@ task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) { task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) { from dependenciesPath ?: tarTree(downloadGlog.dest) from 'src/main/jni/third-party/glog/' - include 'glog-0.3.3/src/**/*', 'Android.mk', 'config.h' + include 'glog-0.3.5/src/**/*', 'Android.mk', 'config.h' includeEmptyDirs = false filesMatching('**/*.h.in') { filter(ReplaceTokens, tokens: [ @@ -126,9 +126,9 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) } task downloadJSCHeaders(type: Download) { - // in sync with webkit SVN revision 174650 - def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/' - def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h'] + // in sync with webkit SVN revision 224110 + def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/7d54617067ba6f2333f1b0b46dc39eea9e32a529/Source/JavaScriptCore/API/' + def jscHeaderFiles = ['JavaScript.h', 'JSTypedArray.h','JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h'] def output = new File(downloadsDir, 'jsc') output.mkdirs() src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" }) @@ -137,10 +137,15 @@ task downloadJSCHeaders(type: Download) { dest output } +task downloadJSC(type: Exec) { + workingDir "../jsc-android-manager" + commandLine('yarn', 'install') +} + // Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org -task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) << { +task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders, downloadJSC]) doLast { copy { - from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile) + from zipTree("../jsc-android-manager/node_modules/jsc-android/dist/org/webkit/android-jsc/r224109/android-jsc-r224109.aar") from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest} from 'src/main/jni/third-party/jsc/Android.mk' include 'jni/**/*.so', '*.h', 'Android.mk' @@ -157,6 +162,7 @@ task downloadNdkBuildDependencies { dependsOn downloadFolly dependsOn downloadGlog dependsOn downloadJSCHeaders + dependsOn downloadJSC } def getNdkBuildName() { @@ -235,7 +241,11 @@ task cleanReactNdkLib(type: Exec) { task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) { from "$buildDir/react-ndk/all" - exclude '**/libjsc.so' + + // include jsc dependencies + from "$thirdPartyNdkDir/jsc/jni" + include '**/*.so' + into "$buildDir/react-ndk/exported" } @@ -304,7 +314,6 @@ dependencies { compile 'com.squareup.okhttp3:okhttp:3.10.0' compile 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0' compile 'com.squareup.okio:okio:1.14.0' - compile 'org.webkit:android-jsc:r174650' testCompile "junit:junit:${JUNIT_VERSION}" testCompile "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}" diff --git a/ReactAndroid/gradle.properties b/ReactAndroid/gradle.properties index 9b7ac6d1254dc8..353f17897699ad 100644 --- a/ReactAndroid/gradle.properties +++ b/ReactAndroid/gradle.properties @@ -5,8 +5,6 @@ POM_NAME=ReactNative POM_ARTIFACT_ID=react-native POM_PACKAGING=aar -android.useDeprecatedNdk=true - MOCKITO_CORE_VERSION=1.10.19 POWERMOCK_VERSION=1.6.2 ROBOLECTRIC_VERSION=3.0 diff --git a/ReactAndroid/src/main/jni/Application.mk b/ReactAndroid/src/main/jni/Application.mk index 2a1e94dc049479..12f487b7926835 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -1,15 +1,15 @@ APP_BUILD_SCRIPT := Android.mk -APP_ABI := armeabi-v7a x86 -APP_PLATFORM := android-9 +APP_ABI := armeabi-v7a x86 arm64-v8a x86_64 +APP_PLATFORM := android-16 APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST))) NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party -APP_STL := gnustl_shared +APP_STL := c++_shared # Make sure every shared lib includes a .note.gnu.build-id header APP_LDFLAGS := -Wl,--build-id -NDK_TOOLCHAIN_VERSION := 4.8 +NDK_TOOLCHAIN_VERSION := clang diff --git a/ReactAndroid/src/main/jni/first-party/fb/Android.mk b/ReactAndroid/src/main/jni/first-party/fb/Android.mk index 4540eef1d60210..cf85de2f8781ef 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/fb/Android.mk @@ -32,7 +32,7 @@ ifeq ($(TOOLCHAIN_PERMISSIVE),true) endif LOCAL_CFLAGS += -DHAVE_POSIX_CLOCKS -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk b/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk index 6d08079a7ebc7b..be13e47a6f4891 100644 --- a/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk +++ b/ReactAndroid/src/main/jni/first-party/fbgloginit/Android.mk @@ -10,7 +10,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_CFLAGS := -fexceptions -fno-omit-frame-pointer LOCAL_CFLAGS += -Wall -Werror -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/ReactAndroid/src/main/jni/react/jni/Android.mk b/ReactAndroid/src/main/jni/react/jni/Android.mk index 8fe31894cdff3d..06d992d49244c6 100644 --- a/ReactAndroid/src/main/jni/react/jni/Android.mk +++ b/ReactAndroid/src/main/jni/react/jni/Android.mk @@ -31,13 +31,21 @@ LOCAL_SRC_FILES := \ LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. -LOCAL_CFLAGS += -Wall -Werror -fvisibility=hidden -fexceptions -frtti +LOCAL_CFLAGS += \ + -Werror \ + -fvisibility=hidden \ + -fexceptions \ + -frtti \ + -Wno-pessimizing-move \ + -Wno-inconsistent-missing-override \ + -Wno-unused-lambda-capture + CXX11_FLAGS := -std=c++11 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) LOCAL_LDLIBS += -landroid -LOCAL_SHARED_LIBRARIES := libfolly_json libfbjni libjsc libglog_init libyoga libprivatedata +LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga libprivatedata LOCAL_STATIC_LIBRARIES := libreactnative include $(BUILD_SHARED_LIBRARY) diff --git a/ReactAndroid/src/main/jni/third-party/boost/Android.mk b/ReactAndroid/src/main/jni/third-party/boost/Android.mk index 35de5ae29b06d1..a2fae50aded801 100644 --- a/ReactAndroid/src/main/jni/third-party/boost/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/boost/Android.mk @@ -3,7 +3,7 @@ include $(CLEAR_VARS) LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0 -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++1y LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) LOCAL_MODULE := boost diff --git a/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk b/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk index bf0fa7face0153..97b908d91cb6de 100644 --- a/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk @@ -16,8 +16,8 @@ LOCAL_SRC_FILES := \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) -CXX11_FLAGS := -std=c++11 -Wno-unused-variable -Wno-unused-local-typedefs +CXX11_FLAGS := -std=c++1y -Wno-unused-variable -Wno-unused-local-typedefs LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) -include $(BUILD_STATIC_LIBRARY) \ No newline at end of file +include $(BUILD_STATIC_LIBRARY) diff --git a/ReactAndroid/src/main/jni/third-party/folly/Android.mk b/ReactAndroid/src/main/jni/third-party/folly/Android.mk index 5692613c8dd1fe..b25689672454fa 100644 --- a/ReactAndroid/src/main/jni/third-party/folly/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/folly/Android.mk @@ -14,12 +14,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti -LOCAL_CFLAGS += -Wall -Werror -std=c++11 +LOCAL_CFLAGS += -Wall -Werror -CXX11_FLAGS := -std=gnu++11 +CXX11_FLAGS := -std=c++1y LOCAL_CFLAGS += $(CXX11_FLAGS) -FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 +FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_MEMRCHR=1 LOCAL_CFLAGS += $(FOLLY_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) $(FOLLY_FLAGS) diff --git a/ReactAndroid/src/main/jni/third-party/glog/Android.mk b/ReactAndroid/src/main/jni/third-party/glog/Android.mk index 96478acbe922a5..3fb2bd31cd3a16 100644 --- a/ReactAndroid/src/main/jni/third-party/glog/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/glog/Android.mk @@ -3,17 +3,17 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - glog-0.3.3/src/demangle.cc \ - glog-0.3.3/src/logging.cc \ - glog-0.3.3/src/raw_logging.cc \ - glog-0.3.3/src/signalhandler.cc \ - glog-0.3.3/src/symbolize.cc \ - glog-0.3.3/src/utilities.cc \ - glog-0.3.3/src/vlog_is_on.cc + glog-0.3.5/src/demangle.cc \ + glog-0.3.5/src/logging.cc \ + glog-0.3.5/src/raw_logging.cc \ + glog-0.3.5/src/signalhandler.cc \ + glog-0.3.5/src/symbolize.cc \ + glog-0.3.5/src/utilities.cc \ + glog-0.3.5/src/vlog_is_on.cc -LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/ +LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/ -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/ +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/ LOCAL_CFLAGS += \ -Wall \ @@ -24,9 +24,10 @@ LOCAL_CFLAGS += \ -g \ -O2 \ -D_START_GOOGLE_NAMESPACE_="namespace google {" \ - -D_END_GOOGLE_NAMESPACE_="}" + -D_END_GOOGLE_NAMESPACE_="}" \ + -DHAVE_PREAD=1 LOCAL_MODULE := glog -include $(BUILD_SHARED_LIBRARY) \ No newline at end of file +include $(BUILD_SHARED_LIBRARY) diff --git a/ReactAndroid/src/main/jni/third-party/glog/config.h b/ReactAndroid/src/main/jni/third-party/glog/config.h index 1e20b0da7a570f..e87b06ca31b681 100644 --- a/ReactAndroid/src/main/jni/third-party/glog/config.h +++ b/ReactAndroid/src/main/jni/third-party/glog/config.h @@ -132,7 +132,7 @@ #define PACKAGE_NAME "glog" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "glog 0.3.3" +#define PACKAGE_STRING "glog 0.3.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "glog" @@ -141,7 +141,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.3.3" +#define PACKAGE_VERSION "0.3.5" /* How to access the PC from a struct ucontext */ /* #undef PC_FROM_UCONTEXT */ @@ -163,7 +163,7 @@ #define TEST_SRC_DIR "." /* Version number of package */ -#define VERSION "0.3.3" +#define VERSION "0.3.5" /* Stops putting the code inside the Google namespace */ #define _END_GOOGLE_NAMESPACE_ } diff --git a/ReactCommon/cxxreact/Android.mk b/ReactCommon/cxxreact/Android.mk index d4b294fc17fef8..655338a3c14933 100644 --- a/ReactCommon/cxxreact/Android.mk +++ b/ReactCommon/cxxreact/Android.mk @@ -33,8 +33,9 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES) LOCAL_CFLAGS := \ -DLOG_TAG=\"ReactNative\" -LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti -CXX11_FLAGS := -std=c++11 +LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti -Wno-unused-lambda-capture + +CXX11_FLAGS := -std=c++14 LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/ReactCommon/jschelpers/Android.mk b/ReactCommon/jschelpers/Android.mk index 9202278639254f..a3152b131be8e3 100644 --- a/ReactCommon/jschelpers/Android.mk +++ b/ReactCommon/jschelpers/Android.mk @@ -16,7 +16,7 @@ LOCAL_CFLAGS := \ -DLOG_TAG=\"ReactNative\" LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti -CXX11_FLAGS := -std=c++11 +CXX11_FLAGS := -std=c++1y LOCAL_CFLAGS += $(CXX11_FLAGS) LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) diff --git a/jsc-android-manager/package.json b/jsc-android-manager/package.json new file mode 100644 index 00000000000000..6d597ca51f8425 --- /dev/null +++ b/jsc-android-manager/package.json @@ -0,0 +1,8 @@ +{ + "name": "jsc-android-manager", + "version": "0.0.1", + "private": true, + "dependencies": { + "jsc-android": "224109.0.0" + } +} diff --git a/local-cli/templates/HelloWorld/android/app/build.gradle b/local-cli/templates/HelloWorld/android/app/build.gradle index ec6f3022572ae6..b9fe74face9799 100644 --- a/local-cli/templates/HelloWorld/android/app/build.gradle +++ b/local-cli/templates/HelloWorld/android/app/build.gradle @@ -103,16 +103,13 @@ android { targetSdkVersion 22 versionCode 1 versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86" + include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } buildTypes { @@ -126,7 +123,7 @@ android { variant.outputs.each { output -> // 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 - def versionCodes = ["armeabi-v7a":1, "x86":2] + def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = diff --git a/local-cli/templates/HelloWorld/android/gradle.properties b/local-cli/templates/HelloWorld/android/gradle.properties index 1fd964e90b1c5e..89e0d99e2173fc 100644 --- a/local-cli/templates/HelloWorld/android/gradle.properties +++ b/local-cli/templates/HelloWorld/android/gradle.properties @@ -16,5 +16,3 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true - -android.useDeprecatedNdk=true diff --git a/react.gradle b/react.gradle index f048c07d4e3e82..5c121f5ade2573 100644 --- a/react.gradle +++ b/react.gradle @@ -128,6 +128,8 @@ afterEvaluate { runBefore("process${flavorNameCapitalized}Armeabi-v7a${buildNameCapitalized}Resources", currentBundleTask) runBefore("process${flavorNameCapitalized}X86${buildNameCapitalized}Resources", currentBundleTask) + runBefore("process${flavorNameCapitalized}Arm64-v8a${buildNameCapitalized}Resources", currentBundleTask) + runBefore("process${flavorNameCapitalized}X86_64${buildNameCapitalized}Resources", currentBundleTask) runBefore("processUniversal${targetName}Resources", currentBundleTask) runBefore("process${targetName}Resources", currentBundleTask) runBefore("dataBindingProcessLayouts${targetName}", currentBundleTask) diff --git a/scripts/android-setup.sh b/scripts/android-setup.sh index 6492173f3f8de1..3ef80d9ec43a6a 100644 --- a/scripts/android-setup.sh +++ b/scripts/android-setup.sh @@ -33,7 +33,7 @@ function getAndroidNDK { if [ ! -e $DEPS ]; then cd $NDK_HOME echo "Downloading NDK..." - curl -o ndk.zip https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip + curl -o ndk.zip https://dl.google.com/android/repository/android-ndk-r16-linux-x86_64.zip unzip -o -q ndk.zip echo "Installed Android NDK at $NDK_HOME" touch $DEPS diff --git a/scripts/circleci/gradle_download_deps.sh b/scripts/circleci/gradle_download_deps.sh index 1e093de55a0b7f..fc83fe96dc294b 100755 --- a/scripts/circleci/gradle_download_deps.sh +++ b/scripts/circleci/gradle_download_deps.sh @@ -2,4 +2,4 @@ set -e -./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders \ No newline at end of file +./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders :ReactAndroid:downloadJSC