Skip to content

Commit

Permalink
Revert "add x86_64 arm64-v8a support. Fixes facebook#2814 (facebook#1…
Browse files Browse the repository at this point in the history
…8754)"

This reverts commit 0a2825f.
  • Loading branch information
janicduplessis committed Nov 3, 2018
1 parent 831b8cd commit 7bfccf9
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
21 changes: 19 additions & 2 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -100,6 +100,9 @@ android {
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
Expand All @@ -114,7 +117,7 @@ android {
enable enableSeparateBuildPerCPUArchitecture
universalApk false
reset()
include "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
include "armeabi-v7a", "x86"
}
}
buildTypes {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Binary file removed android-jsc/android-jsc.aar
Binary file not shown.
9 changes: 0 additions & 9 deletions android-jsc/build.gradle

This file was deleted.

7 changes: 5 additions & 2 deletions local-cli/templates/HelloWorld/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 =
Expand Down
4 changes: 1 addition & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 7bfccf9

Please sign in to comment.