Skip to content

[DO NOT MERGE] Muhammad/arch 64 #1

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

Open
wants to merge 20 commits into
base: 0.55-stable
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ buck-out
.gradle
local.properties
*.iml
/android/
#/android/ #local maven repo.

# Node
node_modules
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Core/ReactNativeVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
exports.version = {
major: 0,
minor: 55,
patch: 4,
patch: 5,
prerelease: null,
};
16 changes: 9 additions & 7 deletions RNTester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import com.android.build.OutputFile
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // path to react cli commands
* // IMPORTANT: this path is relative to the defined 'root'
* cliPath: "node_modules/react-native/local-cli/cli.js"
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
Expand All @@ -60,7 +64,8 @@ import com.android.build.OutputFile
project.ext.react = [
bundleAssetName: "RNTesterApp.android.bundle",
entryFile: file("../../js/RNTesterApp.android.js"),
root: "../../../../",
cliPath: "./local-cli/cli.js",
root: "../../../",
inputExcludes: ["android/**", "./**"]
]

Expand All @@ -75,7 +80,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 @@ -92,9 +97,6 @@ android {
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
Expand All @@ -109,7 +111,7 @@ android {
enable enableSeparateBuildPerCPUArchitecture
universalApk false
reset()
include "armeabi-v7a", "x86"
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
Expand All @@ -124,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]
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
Expand Down
1 change: 0 additions & 1 deletion RNTester/android/app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=*****
Expand Down
2 changes: 1 addition & 1 deletion React/Base/RCTVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void __makeVersion()
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(55),
RCTVersionPatch: @(4),
RCTVersionPatch: @(5),
RCTVersionPrerelease: [NSNull null],
};
}
Expand Down
41 changes: 25 additions & 16 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ 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
// - glog-0.3.5
// - jsc-headers
def dependenciesPath = System.getenv("REACT_NATIVE_DEPENDENCIES")

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 All @@ -85,18 +85,18 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy
}

task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
src 'https://github.com/google/glog/archive/v0.3.3.tar.gz'
src 'https://github.com/google/glog/archive/v0.3.5.tar.gz'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'glog-0.3.3.tar.gz')
dest new File(downloadsDir, 'glog-0.3.5.tar.gz')
}

// Prepare glog sources to be compiled, this task will perform steps that normally should've been
// executed by automake. This way we can avoid dependencies on make/automake
task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) {
from dependenciesPath ?: tarTree(downloadGlog.dest)
from 'src/main/jni/third-party/glog/'
include 'glog-0.3.3/src/**/*', 'Android.mk', 'config.h'
include 'glog-0.3.5/src/**/*', 'Android.mk', 'config.h'
includeEmptyDirs = false
filesMatching('**/*.h.in') {
filter(ReplaceTokens, tokens: [
Expand All @@ -122,9 +122,9 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
}

task downloadJSCHeaders(type: Download) {
// in sync with webkit SVN revision 174650
def jscAPIBaseURL = 'https://github.com/raw/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/'
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
// in sync with webkit SVN revision 224110
def jscAPIBaseURL = 'https://github.com/raw/WebKit/webkit/7d54617067ba6f2333f1b0b46dc39eea9e32a529/Source/JavaScriptCore/API/'
def jscHeaderFiles = ['JavaScript.h', 'JSTypedArray.h','JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
def output = new File(downloadsDir, 'jsc')
output.mkdirs()
src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" })
Expand All @@ -133,10 +133,15 @@ task downloadJSCHeaders(type: Download) {
dest output
}

task downloadJSC(type: Exec) {
workingDir "../jsc-android-manager"
commandLine('yarn', 'install')
}

// 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, downloadJSC]) doLast {
copy {
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
from zipTree("../jsc-android-manager/node_modules/jsc-android/dist/org/webkit/android-jsc/r224109/android-jsc-r224109.aar")
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
from 'src/main/jni/third-party/jsc/Android.mk'
include 'jni/**/*.so', '*.h', 'Android.mk'
Expand Down Expand Up @@ -221,7 +226,11 @@ task cleanReactNdkLib(type: Exec) {

task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) {
from "$buildDir/react-ndk/all"
exclude '**/libjsc.so'

// include jsc dependencies
from "$thirdPartyNdkDir/jsc/jni"
include '**/*.so'

into "$buildDir/react-ndk/exported"
}

Expand Down Expand Up @@ -273,6 +282,7 @@ android {
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'lib/**/libc++_shared.so'
}
}

Expand All @@ -283,12 +293,11 @@ 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'
compile 'com.squareup.okio:okio:1.13.0'
compile 'org.webkit:android-jsc:r174650'

testCompile "junit:junit:${JUNIT_VERSION}"
testCompile "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}"
Expand Down
3 changes: 1 addition & 2 deletions ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
VERSION_NAME=0.55.4
VERSION_NAME=0.55.5
GROUP=com.facebook.react

POM_NAME=ReactNative
POM_ARTIFACT_ID=react-native
POM_PACKAGING=aar

android.useDeprecatedNdk=true

MOCKITO_CORE_VERSION=1.10.19
POWERMOCK_VERSION=1.6.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 55,
"patch", 4,
"patch", 5,
"prerelease", null);
}
8 changes: 4 additions & 4 deletions ReactAndroid/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
APP_BUILD_SCRIPT := Android.mk

APP_ABI := armeabi-v7a x86
APP_PLATFORM := android-9
APP_ABI := armeabi-v7a x86 arm64-v8a x86_64
APP_PLATFORM := android-16

APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party

APP_STL := gnustl_shared
APP_STL := c++_shared

# Make sure every shared lib includes a .note.gnu.build-id header
APP_LDFLAGS := -Wl,--build-id

NDK_TOOLCHAIN_VERSION := 4.8
NDK_TOOLCHAIN_VERSION := clang
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/first-party/fb/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ifeq ($(TOOLCHAIN_PERMISSIVE),true)
endif
LOCAL_CFLAGS += -DHAVE_POSIX_CLOCKS

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

LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS := -fexceptions -fno-omit-frame-pointer
LOCAL_CFLAGS += -Wall -Werror

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

LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
Expand Down
12 changes: 10 additions & 2 deletions ReactAndroid/src/main/jni/react/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ LOCAL_SRC_FILES := \
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..

LOCAL_CFLAGS += -Wall -Werror -fvisibility=hidden -fexceptions -frtti
LOCAL_CFLAGS += \
-Werror \
-fvisibility=hidden \
-fexceptions \
-frtti \
-Wno-pessimizing-move \
-Wno-inconsistent-missing-override \
-Wno-unused-lambda-capture

CXX11_FLAGS := -std=c++11
LOCAL_CFLAGS += $(CXX11_FLAGS)
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)

LOCAL_LDLIBS += -landroid
LOCAL_SHARED_LIBRARIES := libfolly_json libfbjni libjsc libglog_init libyoga libprivatedata
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga libprivatedata
LOCAL_STATIC_LIBRARIES := libreactnative

include $(BUILD_SHARED_LIBRARY)
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/main/jni/third-party/boost/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include $(CLEAR_VARS)

LOCAL_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/boost_1_63_0
CXX11_FLAGS := -std=gnu++11
CXX11_FLAGS := -std=c++1y
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)

LOCAL_MODULE := boost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ 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)

include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
6 changes: 3 additions & 3 deletions ReactAndroid/src/main/jni/third-party/folly/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ 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

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

FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1
FOLLY_FLAGS := -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_MEMRCHR=1
LOCAL_CFLAGS += $(FOLLY_FLAGS)

LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS) $(FOLLY_FLAGS)
Expand Down
23 changes: 12 additions & 11 deletions ReactAndroid/src/main/jni/third-party/glog/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
glog-0.3.3/src/demangle.cc \
glog-0.3.3/src/logging.cc \
glog-0.3.3/src/raw_logging.cc \
glog-0.3.3/src/signalhandler.cc \
glog-0.3.3/src/symbolize.cc \
glog-0.3.3/src/utilities.cc \
glog-0.3.3/src/vlog_is_on.cc
glog-0.3.5/src/demangle.cc \
glog-0.3.5/src/logging.cc \
glog-0.3.5/src/raw_logging.cc \
glog-0.3.5/src/signalhandler.cc \
glog-0.3.5/src/symbolize.cc \
glog-0.3.5/src/utilities.cc \
glog-0.3.5/src/vlog_is_on.cc

LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.3/src/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog-0.3.5/src/

LOCAL_CFLAGS += \
-Wall \
Expand All @@ -24,9 +24,10 @@ LOCAL_CFLAGS += \
-g \
-O2 \
-D_START_GOOGLE_NAMESPACE_="namespace google {" \
-D_END_GOOGLE_NAMESPACE_="}"
-D_END_GOOGLE_NAMESPACE_="}" \
-DHAVE_PREAD=1


LOCAL_MODULE := glog

include $(BUILD_SHARED_LIBRARY)
include $(BUILD_SHARED_LIBRARY)
6 changes: 3 additions & 3 deletions ReactAndroid/src/main/jni/third-party/glog/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
#define PACKAGE_NAME "glog"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "glog 0.3.3"
#define PACKAGE_STRING "glog 0.3.5"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "glog"
Expand All @@ -141,7 +141,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.3"
#define PACKAGE_VERSION "0.3.5"

/* How to access the PC from a struct ucontext */
/* #undef PC_FROM_UCONTEXT */
Expand All @@ -163,7 +163,7 @@
#define TEST_SRC_DIR "."

/* Version number of package */
#define VERSION "0.3.3"
#define VERSION "0.3.5"

/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
Expand Down
Loading