diff --git a/RNTester/android/app/build.gradle b/RNTester/android/app/build.gradle index bc2423dd6fa257..ce807c4dbd7473 100644 --- a/RNTester/android/app/build.gradle +++ b/RNTester/android/app/build.gradle @@ -76,7 +76,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 +93,6 @@ android { targetSdkVersion 26 versionCode 1 versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } } signingConfigs { release { @@ -110,7 +107,7 @@ android { enable enableSeparateBuildPerCPUArchitecture universalApk false reset() - include "armeabi-v7a", "x86" + include "armeabi-v7a", "x86", "x86_64", "arm64-v8a" } } buildTypes { @@ -123,20 +120,6 @@ android { signingConfig signingConfigs.release } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - 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 abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode - } - } - } } dependencies { diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 7c88ab3019456d..e1dc269d2bec70 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -303,7 +303,7 @@ dependencies { api "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}" api "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}" api 'com.squareup.okio:okio:1.14.0' - compile 'org.webkit:android-jsc:r174650' + compile project(':android-jsc') testImplementation "junit:junit:${JUNIT_VERSION}" testImplementation "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}" diff --git a/ReactAndroid/src/main/jni/Application.mk b/ReactAndroid/src/main/jni/Application.mk index e626ef92f153e8..7c15b8852cbfc7 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -1,6 +1,6 @@ APP_BUILD_SCRIPT := Android.mk -APP_ABI := armeabi-v7a x86 +APP_ABI := armeabi-v7a x86 arm64-v8a x86_64 APP_PLATFORM := android-16 APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST))) 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 7f2dacb3e25f60..64f7e67e8ad51f 100644 --- a/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk +++ b/ReactAndroid/src/main/jni/third-party/double-conversion/Android.mk @@ -19,4 +19,4 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) CXX11_FLAGS := -Wno-unused-variable -Wno-unused-local-typedefs LOCAL_CFLAGS += $(CXX11_FLAGS) -include $(BUILD_STATIC_LIBRARY) \ No newline at end of file +include $(BUILD_STATIC_LIBRARY) diff --git a/android-jsc/android-jsc.aar b/android-jsc/android-jsc.aar new file mode 100644 index 00000000000000..35f203edb7c221 Binary files /dev/null and b/android-jsc/android-jsc.aar differ diff --git a/android-jsc/build.gradle b/android-jsc/build.gradle new file mode 100644 index 00000000000000..dc3e8d0b867b06 --- /dev/null +++ b/android-jsc/build.gradle @@ -0,0 +1,2 @@ +configurations.maybeCreate("default") +artifacts.add("default", file('android-jsc.aar')) \ No newline at end of file diff --git a/local-cli/templates/HelloWorld/android/app/build.gradle b/local-cli/templates/HelloWorld/android/app/build.gradle index 793eae821101a8..a123b6cfb34a73 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 rootProject.ext.targetSdkVersion 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" } } 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] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = diff --git a/settings.gradle b/settings.gradle index c68c5a20fdf80d..12db8a4b9fca7c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,4 +3,6 @@ // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. -include ':ReactAndroid', ':RNTester:android:app' +include ':ReactAndroid' +include ':RNTester:android:app' +include ':android-jsc'