Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Android 64-bit #17640

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ android {
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
Expand All @@ -109,7 +106,7 @@ android {
enable enableSeparateBuildPerCPUArchitecture
universalApk false
reset()
include "armeabi-v7a", "x86"
include "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
}
}
buildTypes {
Expand Down
12 changes: 6 additions & 6 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")

// You need to have following folders in this directory:
// - boost_1_63_0
// - double-conversion-1.1.1
// - double-conversion-1.1.6
// - folly-deprecate-dynamic-initializer
// - glog-0.3.3
// - jsc-headers
Expand Down Expand Up @@ -53,16 +53,16 @@ task prepareBoost(dependsOn: boostPath ? [] : [downloadBoost], type: Copy) {
}

task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) {
src 'https://github.com/google/double-conversion/archive/v1.1.1.tar.gz'
src 'https://github.com/google/double-conversion/archive/v1.1.6.tar.gz'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'double-conversion-1.1.1.tar.gz')
dest new File(downloadsDir, 'double-conversion-1.1.6.tar.gz')
}

task prepareDoubleConversion(dependsOn: dependenciesPath ? [] : [downloadDoubleConversion], type: Copy) {
from dependenciesPath ?: tarTree(downloadDoubleConversion.dest)
from 'src/main/jni/third-party/double-conversion/Android.mk'
include 'double-conversion-1.1.1/src/**/*', 'Android.mk'
include 'double-conversion-1.1.6/src/**/*', 'Android.mk'
filesMatching('*/src/**/*', {fname -> fname.path = "double-conversion/${fname.name}"})
includeEmptyDirs = false
into "$thirdPartyNdkDir/double-conversion"
Expand Down Expand Up @@ -134,7 +134,7 @@ task downloadJSCHeaders(type: Download) {
}

// Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) << {
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) doLast {
copy {
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
Expand Down Expand Up @@ -283,7 +283,7 @@ dependencies {
compile 'com.facebook.fbui.textlayoutbuilder:textlayoutbuilder:1.0.0'
compile 'com.facebook.fresco:fresco:1.3.0'
compile 'com.facebook.fresco:imagepipeline-okhttp3:1.3.0'
compile 'com.facebook.soloader:soloader:0.1.0'
compile 'com.facebook.soloader:soloader:0.3.0'
compile 'com.google.code.findbugs:jsr305:3.0.0'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.6.0'
Expand Down
6 changes: 3 additions & 3 deletions ReactAndroid/release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def isReleaseBuild() {
}

def getRepositoryUrl() {
return hasProperty('repositoryUrl') ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
return findProperty('repositoryUrl') != null ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}

def getRepositoryUsername() {
return hasProperty('repositoryUsername') ? property('repositoryUsername') : ''
return findProperty('repositoryUsername') != null ? property('repositoryUsername') : ''
}

def getRepositoryPassword() {
return hasProperty('repositoryPassword') ? property('repositoryPassword') : ''
return findProperty('repositoryPassword') != null ? property('repositoryPassword') : ''
}

def configureReactNativePom(def pom) {
Expand Down
1 change: 1 addition & 0 deletions ReactAndroid/src/main/java/com/facebook/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ android_library(
srcs = glob(["*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support-annotations:android-support-annotations")
],
visibility = [
"PUBLIC",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ android_library(
srcs = glob(["*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
],
visibility = [
"PUBLIC",
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -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-9

APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LOCAL_SRC_FILES := \

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

CXX11_FLAGS := -std=c++11 -Wno-unused-variable -Wno-unused-local-typedefs
CXX11_FLAGS := -std=c++1y -Wno-unused-variable -Wno-unused-local-typedefs
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)

Expand Down
4 changes: 2 additions & 2 deletions ReactAndroid/src/main/jni/third-party/folly/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti
LOCAL_CFLAGS += -Wall -Werror -std=c++11
LOCAL_CFLAGS += -Wall -Werror -std=c++1y

CXX11_FLAGS := -std=gnu++11
CXX11_FLAGS := -std=gnu++1y
LOCAL_CFLAGS += $(CXX11_FLAGS)

FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ android_prebuilt_aar(

remote_file(
name = "soloader-binary-aar",
sha1 = "918573465c94c6bc9bad48ef259f1e0cd6543c1b",
url = "mvn:com.facebook.soloader:soloader:aar:0.1.0",
sha1 = "5f4b28f3c401f3d9bb2d081af08f6ce784a02da5",
url = "mvn:com.facebook.soloader:soloader:aar:0.3.0",
)
2 changes: 1 addition & 1 deletion ReactCommon/cxxreact/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\"

LOCAL_CFLAGS += -Wall -Werror -fexceptions -frtti
CXX11_FLAGS := -std=c++11
CXX11_FLAGS := -std=c++1y
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)

Expand Down
5 changes: 1 addition & 4 deletions local-cli/templates/HelloWorld/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,13 @@ android {
targetSdkVersion 22
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", "x86_64", "arm64-v8a"
}
}
buildTypes {
Expand Down