Skip to content

Commit 896608c

Browse files
gengjiawenfacebook-github-bot
authored andcommitted
add x86_64 arm64-v8a support. Fixes #2814 (#18754)
Summary: add arm64 support, related issue : react/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
1 parent 4694951 commit 896608c

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

android/app/build.gradle

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ apply from: "../../../react.gradle"
7676
* Upload all the APKs to the Play Store and people will download
7777
* the correct one based on the CPU architecture of their device.
7878
*/
79-
def enableSeparateBuildPerCPUArchitecture = false
79+
def enableSeparateBuildPerCPUArchitecture = true
8080

8181
/**
8282
* Run Proguard to shrink the Java bytecode in release builds.
@@ -93,9 +93,6 @@ android {
9393
targetSdkVersion 27
9494
versionCode 1
9595
versionName "1.0"
96-
ndk {
97-
abiFilters "armeabi-v7a", "x86"
98-
}
9996
}
10097
signingConfigs {
10198
release {
@@ -110,7 +107,7 @@ android {
110107
enable enableSeparateBuildPerCPUArchitecture
111108
universalApk false
112109
reset()
113-
include "armeabi-v7a", "x86"
110+
include "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
114111
}
115112
}
116113
buildTypes {
@@ -123,20 +120,6 @@ android {
123120
signingConfig signingConfigs.release
124121
}
125122
}
126-
127-
// applicationVariants are e.g. debug, release
128-
applicationVariants.all { variant ->
129-
variant.outputs.each { output ->
130-
// For each separate APK per architecture, set a unique version code as described here:
131-
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
132-
def versionCodes = ["armeabi-v7a":1, "x86":2]
133-
def abi = output.getFilter(OutputFile.ABI)
134-
if (abi != null) { // null for the universal-debug, universal-release variants
135-
output.versionCodeOverride =
136-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
137-
}
138-
}
139-
}
140123
}
141124

142125
dependencies {

0 commit comments

Comments
 (0)