diff --git a/RNTester/android/app/build.gradle b/RNTester/android/app/build.gradle index f0f5926139f923..88a51eabde0eb5 100644 --- a/RNTester/android/app/build.gradle +++ b/RNTester/android/app/build.gradle @@ -83,7 +83,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 = true +def enableSeparateBuildPerCPUArchitecture = false /** * Run Proguard to shrink the Java bytecode in release builds. @@ -100,6 +100,9 @@ android { targetSdkVersion 27 versionCode 1 versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } } signingConfigs { release { @@ -114,7 +117,7 @@ android { enable enableSeparateBuildPerCPUArchitecture universalApk false reset() - include "armeabi-v7a", "x86", "x86_64", "arm64-v8a" + include "armeabi-v7a", "x86" } } buildTypes { @@ -127,6 +130,20 @@ 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 a419728d773e9c..c1dd696afe3a7d 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -324,7 +324,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 project(':android-jsc') + compile 'org.webkit:android-jsc:r174650' 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 942a122de79183..332ced9eaf7f53 100644 --- a/ReactAndroid/src/main/jni/Application.mk +++ b/ReactAndroid/src/main/jni/Application.mk @@ -5,7 +5,7 @@ APP_BUILD_SCRIPT := Android.mk -APP_ABI := armeabi-v7a x86 arm64-v8a x86_64 +APP_ABI := armeabi-v7a x86 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 64f7e67e8ad51f..7f2dacb3e25f60 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) +include $(BUILD_STATIC_LIBRARY) \ No newline at end of file diff --git a/android-jsc/android-jsc.aar b/android-jsc/android-jsc.aar deleted file mode 100644 index 35f203edb7c221..00000000000000 Binary files a/android-jsc/android-jsc.aar and /dev/null differ diff --git a/android-jsc/build.gradle b/android-jsc/build.gradle deleted file mode 100644 index fcc9f9d533a5eb..00000000000000 --- a/android-jsc/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -configurations.maybeCreate("default") -artifacts.add("default", file('android-jsc.aar')) diff --git a/local-cli/templates/HelloWorld/android/app/build.gradle b/local-cli/templates/HelloWorld/android/app/build.gradle index a123b6cfb34a73..793eae821101a8 100644 --- a/local-cli/templates/HelloWorld/android/app/build.gradle +++ b/local-cli/templates/HelloWorld/android/app/build.gradle @@ -103,13 +103,16 @@ 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", "arm64-v8a" + include "armeabi-v7a", "x86" } } buildTypes { @@ -123,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, "arm64-v8a": 3] + 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 = diff --git a/settings.gradle b/settings.gradle index e3df53aef2e6f4..d3cd3de373225c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,6 +3,4 @@ // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. -include ':ReactAndroid' -include ':RNTester:android:app' -include ':android-jsc' +include ':ReactAndroid', ':RNTester:android:app'