mirror of
https://github.com/status-im/react-native.git
synced 2025-02-20 13:18:07 +00:00
Summary: add arm64 support, related issue : https://github.com/facebook/react-native/issues/2814. If we are okay with binary aar android-jsc, then the pr can be directly merged. Otherwise merge facebook/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. https://github.com/facebook/android-jsc/pull/30. [ANDROID] [ENHANCEMENT] [ABI] - add x86_64 arm64-v8a support. Differential Revision: D9491481 Pulled By: hramos fbshipit-source-id: d6ec6992768eb0c0866a0317273e09fae5b8935e
This commit is contained in:
parent
ef863c0679
commit
0a2825f8b3
@ -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 27
|
||||
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 {
|
||||
|
@ -304,7 +304,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}"
|
||||
|
@ -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)))
|
||||
|
@ -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)
|
||||
|
BIN
android-jsc/android-jsc.aar
Normal file
BIN
android-jsc/android-jsc.aar
Normal file
Binary file not shown.
2
android-jsc/build.gradle
Normal file
2
android-jsc/build.gradle
Normal file
@ -0,0 +1,2 @@
|
||||
configurations.maybeCreate("default")
|
||||
artifacts.add("default", file('android-jsc.aar'))
|
@ -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 =
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user