Skip to content

Commit

Permalink
add x86_64 arm64-v8a support. Fixes #2814 (#18754)
Browse files Browse the repository at this point in the history
Summary:
add arm64 support, related issue : facebook/react-native#2814.
If we are okay with binary aar android-jsc, then the pr can be directly merged. Otherwise merge facebookarchive/android-jsc#30 first and do a new release.

RNTester all variant works. You can also test the apk from here: https://github.com/gengjiawen/react-native/releases/tag/v0.56beta.

facebookarchive/android-jsc#30.

 [ANDROID] [ENHANCEMENT] [ABI] - add x86_64 arm64-v8a support.

Differential Revision: D9491481

Pulled By: hramos

fbshipit-source-id: d6ec6992768eb0c0866a0317273e09fae5b8935e
  • Loading branch information
gengjiawen authored and facebook-github-bot committed Sep 24, 2018
1 parent 4694951 commit 896608c
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -93,9 +93,6 @@ android {
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
Expand All @@ -110,7 +107,7 @@ android {
enable enableSeparateBuildPerCPUArchitecture
universalApk false
reset()
include "armeabi-v7a", "x86"
include "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
}
}
buildTypes {
Expand All @@ -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 {
Expand Down

0 comments on commit 896608c

Please sign in to comment.