Bunch of build fixes in ReactAndroid and ReactCommon

This commit is contained in:
Rohit Jain (MOD) 2019-03-12 15:48:05 +05:30
Родитель 27381d39db
Коммит 96633566cc
36 изменённых файлов: 40 добавлений и 612 удалений

Просмотреть файл

@ -92,21 +92,12 @@ def enableProguardInReleaseBuilds = true
android {
compileSdkVersion 28
<<<<<<< HEAD
buildToolsVersion "28.0.1"
defaultConfig {
applicationId "com.facebook.react.uiapp"
minSdkVersion 21
targetSdkVersion 28
=======
buildToolsVersion "28.0.2"
defaultConfig {
applicationId "com.facebook.react.uiapp"
minSdkVersion 16
targetSdkVersion 27
>>>>>>> v0.58.6
versionCode 1
versionName "1.0"
}
@ -140,8 +131,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
<<<<<<< HEAD
implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
// Build React Native from source
if (isSDXPlatform()) {
@ -150,10 +140,4 @@ dependencies {
else {
implementation project(':ReactAndroid')
}
=======
implementation 'com.android.support:appcompat-v7:28.0.0'
// Build React Native from source
implementation project(':ReactAndroid')
>>>>>>> v0.58.6
}

Просмотреть файл

@ -68,15 +68,10 @@ task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
task prepareBoost(dependsOn: createNativeDepsDirectories, type: Copy) {
from hasBoostNuget ? BoostNugetPath : tarTree(resources.gzip(downloadBoost.dest))
from 'src/main/jni/third-party/boost/Android.mk'
<<<<<<< HEAD
include 'Android.mk', hasBoostNuget ? 'boost/**/*.hpp' : 'boost_1_63_0/boost/**/*.hpp'
=======
include 'Android.mk', "boost_${BOOST_VERSION}/boost/**/*.hpp", 'boost/boost/**/*.hpp'
>>>>>>> v0.58.6
includeEmptyDirs = false
into "$thirdPartyNdkDir/boost_tmp"
doLast {
<<<<<<< HEAD
if (hasBoostNuget) {
file("$thirdPartyNdkDir/boost_tmp").renameTo("$thirdPartyNdkDir/boost")
} else {
@ -90,83 +85,25 @@ task prepareDoubleConversion(dependsOn: createNativeDepsDirectories, type: Copy)
from DoubleConversionPath
from 'src/main/jni/third-party/double-conversion/Android.mk'
include 'double-conversion/**/*', 'Android.mk'
=======
file("$thirdPartyNdkDir/boost/boost").renameTo("$thirdPartyNdkDir/boost/boost_${BOOST_VERSION}")
}
}
task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) {
src "https://github.com/google/double-conversion/archive/v${DOUBLE_CONVERSION_VERSION}.tar.gz"
onlyIfNewer true
overwrite false
dest new File(downloadsDir, "double-conversion-${DOUBLE_CONVERSION_VERSION}.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-${DOUBLE_CONVERSION_VERSION}/src/**/*", 'Android.mk'
filesMatching('*/src/**/*', {fname -> fname.path = "double-conversion/${fname.name}"})
>>>>>>> v0.58.6
includeEmptyDirs = false
into "$thirdPartyNdkDir/double-conversion"
}
<<<<<<< HEAD
task prepareFolly(dependsOn: createNativeDepsDirectories, type: Copy) {
from FollyPath
from 'src/main/jni/third-party/folly/Android.mk'
include 'Folly/folly/**/*', 'Android.mk'
eachFile {fname -> fname.path = (fname.path - "Folly/")}
=======
task downloadFolly(dependsOn: createNativeDepsDirectories, type: Download) {
src "https://github.com/facebook/folly/archive/v${FOLLY_VERSION}.tar.gz"
onlyIfNewer true
overwrite false
dest new File(downloadsDir, "folly-${FOLLY_VERSION}.tar.gz");
}
task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy) {
from dependenciesPath ?: tarTree(downloadFolly.dest)
from 'src/main/jni/third-party/folly/Android.mk'
include "folly-${FOLLY_VERSION}/folly/**/*", 'Android.mk'
eachFile {fname -> fname.path = (fname.path - "folly-${FOLLY_VERSION}/")}
>>>>>>> v0.58.6
includeEmptyDirs = false
// Patch for folly build break on gcc 4.9 and could be removed after build by clang
filesMatching('**/container/detail/F14Policy.h') {
filter(ReplaceTokens, tokens: [
'ObjectHolder(Args&&... args) : value_{std::forward<Args>(args)...} {}': 'ObjectHolder(Args&&... args) : value_({std::forward<Args>(args)...}) {}',
'ObjectHolder(Args&&... args) : T{std::forward<Args>(args)...} {}': 'ObjectHolder(Args&&... args) : T({std::forward<Args>(args)...}) {}',
],
beginToken: '',
endToken: '')
}
into "$thirdPartyNdkDir/folly"
}
<<<<<<< HEAD
=======
task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
src "https://github.com/google/glog/archive/v${GLOG_VERSION}.tar.gz"
onlyIfNewer true
overwrite false
dest new File(downloadsDir, "glog-${GLOG_VERSION}.tar.gz")
}
>>>>>>> v0.58.6
// 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: createNativeDepsDirectories, type: Copy) {
from GlogPath
from 'src/main/jni/third-party/glog/'
<<<<<<< HEAD
include 'glog/src/**/*', 'Android.mk', 'config.h'
=======
include "glog-${GLOG_VERSION}/src/**/*", 'Android.mk', 'config.h'
>>>>>>> v0.58.6
includeEmptyDirs = false
filesMatching('**/*.h.in') {
filter(ReplaceTokens, tokens: [
@ -189,17 +126,8 @@ task prepareGlog(dependsOn: createNativeDepsDirectories, type: Copy) {
it.path = (it.name - '.in')
}
into "$thirdPartyNdkDir/glog"
doLast {
copy {
from fileTree(dir: "$thirdPartyNdkDir/glog", includes: ["stl_logging.h", "logging.h", "raw_logging.h", "vlog_is_on.h", "**/glog/log_severity.h"]).files
includeEmptyDirs = false
into "$thirdPartyNdkDir/glog/exported/glog"
}
}
}
<<<<<<< HEAD
// Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org
task prepareJSC(dependsOn: createNativeDepsDirectories) {
if (isV8Enabled()) {
@ -214,29 +142,6 @@ task prepareJSC(dependsOn: createNativeDepsDirectories) {
filesMatching('*.h', { fname -> fname.path = "JavaScriptCore/${fname.path}"})
into "$thirdPartyNdkDir/jsc";
}
=======
task downloadJSCHeaders(type: Download) {
// in sync with webkit SVN revision 174650
def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/'
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
def output = new File(downloadsDir, 'jsc')
output.mkdirs()
src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" })
onlyIfNewer true
overwrite false
dest output
}
// Create Android.mk library module based on so files from mvn + include headers fetched from webkit.org
task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) << {
copy {
from zipTree(configurations.compile.fileCollection { dep -> dep.name == 'android-jsc' }.singleFile)
from dependenciesPath ? "$dependenciesPath/jsc-headers" : {downloadJSCHeaders.dest}
from 'src/main/jni/third-party/jsc'
include 'jni/**/*.so', '*.h', 'Android.mk'
filesMatching('*.h', { fname -> fname.path = "JavaScriptCore/${fname.path}"})
into "$thirdPartyNdkDir/jsc";
>>>>>>> v0.58.6
}
}
@ -333,19 +238,11 @@ task packageReactNdkLibsForBuck(dependsOn: packageReactNdkLibs, type: Copy) {
android {
compileSdkVersion 28
<<<<<<< HEAD
buildToolsVersion "28.0.1"
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
=======
buildToolsVersion "28.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
>>>>>>> v0.58.6
versionCode 1
versionName "1.0"
@ -388,7 +285,6 @@ android {
}
dependencies {
<<<<<<< HEAD
if (System.getenv("BUCK_BUILD") != "1")
{
if (isSDXPlatform()) {
@ -399,20 +295,6 @@ dependencies {
}
}
api 'com.facebook.infer.annotation:infer-annotation:0.11.2'
api 'javax.inject:javax.inject:1'
api 'com.android.support:appcompat-v7:26.0.2'
api "com.facebook.fresco:fresco:${FRESCO_VERSION}"
api "com.facebook.fresco:imagepipeline-okhttp3:${FRESCO_VERSION}"
api 'com.facebook.soloader:soloader:0.5.1'
api 'com.google.code.findbugs:jsr305:3.0.2'
api "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
api "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}"
api 'com.squareup.okio:okio:1.14.0'
if (!isV8Enabled()) {
compile 'org.webkit:android-jsc:r174650'
}
=======
api 'com.facebook.infer.annotation:infer-annotation:0.11.2'
api 'javax.inject:javax.inject:1'
api 'com.android.support:appcompat-v7:28.0.0'
@ -424,7 +306,6 @@ dependencies {
api "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}"
api 'com.squareup.okio:okio:1.15.0'
compile 'org.webkit:android-jsc:r174650'
>>>>>>> v0.58.6
testImplementation "junit:junit:${JUNIT_VERSION}"
testImplementation "org.powermock:powermock-api-mockito:${POWERMOCK_VERSION}"
@ -435,13 +316,9 @@ dependencies {
testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}"
androidTestImplementation fileTree(dir: 'src/main/third-party/java/buck-android-support/', include: ['*.jar'])
<<<<<<< HEAD
androidTestImplementation 'com.android.support.test:runner:0.3'
=======
androidTestImplementation "com.android.support.test:runner:${ANDROID_SUPPORT_TEST_VERSION}"
androidTestImplementation "com.android.support.test:rules:${ANDROID_SUPPORT_TEST_VERSION}"
>>>>>>> v0.58.6
androidTestImplementation "org.mockito:mockito-core:${MOCKITO_CORE_VERSION}"
}
apply from: 'release.gradle'
apply from: 'release.gradle'

Просмотреть файл

@ -11,17 +11,12 @@ ROBOLECTRIC_VERSION=3.0
JUNIT_VERSION=4.12
FEST_ASSERT_CORE_VERSION=2.0M10
<<<<<<< HEAD
FRESCO_VERSION=1.10.0
OKHTTP_VERSION=3.10.0
=======
ANDROID_SUPPORT_TEST_VERSION=1.0.2
FRESCO_VERSION=1.10.0
OKHTTP_VERSION=3.12.1
SO_LOADER_VERSION=0.6.0
BOOST_VERSION=1_63_0
DOUBLE_CONVERSION_VERSION=1.1.6
FOLLY_VERSION=2018.10.22.00
GLOG_VERSION=0.3.5
>>>>>>> v0.58.6
GLOG_VERSION=0.3.5

Просмотреть файл

@ -60,11 +60,6 @@ public class NativeModuleRegistryBuilder {
}
public NativeModuleRegistry build() {
<<<<<<< HEAD
return new NativeModuleRegistry(
mReactApplicationContext, mModules);
=======
return new NativeModuleRegistry(mReactApplicationContext, mModules);
>>>>>>> v0.58.6
}
}

Просмотреть файл

@ -1083,23 +1083,17 @@ public class ReactInstanceManager {
ReactMarker.logMarker(PRE_SETUP_REACT_CONTEXT_END);
ReactMarker.logMarker(SETUP_REACT_CONTEXT_START);
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "setupReactContext");
<<<<<<< HEAD
synchronized (mReactContextLock) {
mCurrentReactContext = Assertions.assertNotNull(reactContext);
}
final CatalystInstance catalystInstance =
Assertions.assertNotNull(reactContext.getCatalystInstance());
=======
synchronized (mAttachedRootViews) {
synchronized (mReactContextLock) {
mCurrentReactContext = Assertions.assertNotNull(reactContext);
}
>>>>>>> v0.58.6
CatalystInstance catalystInstance =
Assertions.assertNotNull(reactContext.getCatalystInstance());
catalystInstance.initialize();
mDevSupportManager.onNewReactContextCreated(reactContext);
mMemoryPressureRouter.addMemoryPressureListener(catalystInstance);
moveReactContextToCurrentLifecycleState();
<<<<<<< HEAD
// Do not attach root views if the context is created synchronously on UI thread.
if (!mIsContextCreatedOnUIThread) {
ReactMarker.logMarker(ATTACH_MEASURED_ROOT_VIEWS_START);
@ -1107,16 +1101,6 @@ public class ReactInstanceManager {
for (ReactRootView rootView : mAttachedRootViews) {
attachRootViewToInstance(rootView, catalystInstance);
}
=======
catalystInstance.initialize();
mDevSupportManager.onNewReactContextCreated(reactContext);
mMemoryPressureRouter.addMemoryPressureListener(catalystInstance);
moveReactContextToCurrentLifecycleState();
ReactMarker.logMarker(ATTACH_MEASURED_ROOT_VIEWS_START);
for (ReactRootView rootView : mAttachedRootViews) {
attachRootViewToInstance(rootView);
>>>>>>> v0.58.6
}
ReactMarker.logMarker(ATTACH_MEASURED_ROOT_VIEWS_END);
}

Просмотреть файл

@ -39,13 +39,7 @@ public class ModuleHolder {
private final int mInstanceKey = sInstanceKeyCounter.getAndIncrement();
private final String mName;
<<<<<<< HEAD
private final boolean mCanOverrideExistingModule;
private final boolean mHasConstants;
private final boolean mIsCxxModule;
=======
private final ReactModuleInfo mReactModuleInfo;
>>>>>>> v0.58.6
private @Nullable Provider<? extends NativeModule> mProvider;
// Outside of the constructur, these should only be checked or set when synchronized on this
@ -59,11 +53,7 @@ public class ModuleHolder {
public ModuleHolder(ReactModuleInfo moduleInfo, Provider<? extends NativeModule> provider) {
mName = moduleInfo.name();
mProvider = provider;
<<<<<<< HEAD
mIsCxxModule = moduleInfo.isCxxModule();
=======
mReactModuleInfo = moduleInfo;
>>>>>>> v0.58.6
if (moduleInfo.needsEagerInit()) {
mModule = create();
}
@ -71,11 +61,6 @@ public class ModuleHolder {
public ModuleHolder(NativeModule nativeModule) {
mName = nativeModule.getName();
<<<<<<< HEAD
mCanOverrideExistingModule = nativeModule.canOverrideExistingModule();
mHasConstants = true;
mIsCxxModule = CxxModuleWrapper.class.isAssignableFrom(nativeModule.getClass());
=======
mReactModuleInfo =
new ReactModuleInfo(
nativeModule.getName(),
@ -85,7 +70,6 @@ public class ModuleHolder {
true,
CxxModuleWrapper.class.isAssignableFrom(nativeModule.getClass()));
>>>>>>> v0.58.6
mModule = nativeModule;
PrinterHolder.getPrinter()
.logMessage(ReactDebugOverlayTags.NATIVE_MODULE, "NativeModule init: %s", mName);
@ -139,13 +123,10 @@ public class ModuleHolder {
return mReactModuleInfo.isCxxModule();
}
<<<<<<< HEAD
=======
public String getClassName() {
return mReactModuleInfo.className();
}
>>>>>>> v0.58.6
@DoNotStrip
public NativeModule getModule() {
NativeModule module;

Просмотреть файл

@ -7,35 +7,22 @@
package com.facebook.react.bridge;
import com.facebook.infer.annotation.Assertions;
<<<<<<< HEAD
=======
import com.facebook.react.module.annotations.ReactModule;
>>>>>>> v0.58.6
import com.facebook.systrace.Systrace;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
<<<<<<< HEAD
/**
* A set of Java APIs to expose to a particular JavaScript instance.
*/
=======
/** A set of Java APIs to expose to a particular JavaScript instance. */
>>>>>>> v0.58.6
public class NativeModuleRegistry {
private final ReactApplicationContext mReactApplicationContext;
private final Map<String, ModuleHolder> mModules;
public NativeModuleRegistry(
<<<<<<< HEAD
ReactApplicationContext reactApplicationContext,
Map<String, ModuleHolder> modules) {
=======
ReactApplicationContext reactApplicationContext, Map<String, ModuleHolder> modules) {
>>>>>>> v0.58.6
mReactApplicationContext = reactApplicationContext;
mModules = modules;
}
@ -49,20 +36,11 @@ public class NativeModuleRegistry {
return mReactApplicationContext;
}
<<<<<<< HEAD
/* package */ Collection<JavaModuleWrapper> getJavaModules(
JSInstance jsInstance) {
=======
/* package */ Collection<JavaModuleWrapper> getJavaModules(JSInstance jsInstance) {
>>>>>>> v0.58.6
ArrayList<JavaModuleWrapper> javaModules = new ArrayList<>();
for (Map.Entry<String, ModuleHolder> entry : mModules.entrySet()) {
if (!entry.getValue().isCxxModule()) {
<<<<<<< HEAD
javaModules.add(new AcJavaModuleWrapper(jsInstance, type, entry.getValue()));
=======
javaModules.add(new JavaModuleWrapper(jsInstance, entry.getValue()));
>>>>>>> v0.58.6
}
}
return javaModules;
@ -132,18 +110,11 @@ public class NativeModuleRegistry {
public void onBatchComplete() {
// The only native module that uses the onBatchComplete is the UI Manager. Hence, instead of
<<<<<<< HEAD
// iterating over all the modules for find this one instance, and then calling it, we short-circuit
// the search, and simply call OnBatchComplete on the UI Manager.
// With Fabric, UIManager would no longer be a NativeModule, so this call would simply go away
ModuleHolder moduleHolder = mModules.get("com.facebook.react.uimanager.UIManagerModule");
=======
// iterating over all the modules for find this one instance, and then calling it, we
// short-circuit
// the search, and simply call OnBatchComplete on the UI Manager.
// With Fabric, UIManager would no longer be a NativeModule, so this call would simply go away
ModuleHolder moduleHolder = mModules.get("UIManager");
>>>>>>> v0.58.6
if (moduleHolder != null && moduleHolder.hasInstance()) {
((OnBatchCompleteListener) moduleHolder.getModule()).onBatchComplete();
}

Просмотреть файл

@ -7,15 +7,9 @@
package com.facebook.react.bridge;
<<<<<<< HEAD
import android.util.Log;
import com.facebook.react.common.ReactConstants;
=======
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
import android.os.SystemClock;
>>>>>>> v0.58.6
import com.facebook.soloader.SoLoader;
import com.facebook.systrace.Systrace;
@ -25,42 +19,34 @@ public class ReactBridge {
private static boolean sDidInit = false;
<<<<<<< HEAD
// Office implementation of RN can work with two JS Engines: V8 and JSC.
// There is a compile time flag to decide which one will be used and V8 is the default one.
// We are exposing an API from ReactBridge so that consumer can choose JSC if required.
private static boolean sUseJSC = false;
public static void staticInit() {
// No locking required here, worst case we'll call into SoLoader twice
// which will do its own locking internally
if (!sDidInit) {
if (sUseJSC) {
SoLoader.loadLibrary("icu_common");
SoLoader.loadLibrary("jsc");
}
else {
SoLoader.loadLibrary("v8_libbase.cr");
SoLoader.loadLibrary("v8_libplatform.cr");
SoLoader.loadLibrary("v8.cr");
}
SoLoader.loadLibrary("glog_init");
SoLoader.loadLibrary("privatedata");
SoLoader.loadLibrary("fb");
SoLoader.loadLibrary("yoga");
SoLoader.loadLibrary("reactnativejni");
sDidInit = true;
=======
public synchronized static void staticInit() {
if (sDidInit) {
return;
>>>>>>> v0.58.6
}
sDidInit = true;
sLoadStartTime = SystemClock.uptimeMillis();
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ReactBridge.staticInit::load:reactnativejni");
if (sUseJSC) {
SoLoader.loadLibrary("icu_common");
SoLoader.loadLibrary("jsc");
}
else {
SoLoader.loadLibrary("v8_libbase.cr");
SoLoader.loadLibrary("v8_libplatform.cr");
SoLoader.loadLibrary("v8.cr");
}
SoLoader.loadLibrary("glog_init");
SoLoader.loadLibrary("privatedata");
SoLoader.loadLibrary("fb");
SoLoader.loadLibrary("yoga");
SoLoader.loadLibrary("reactnativejni");
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
sLoadEndTime = SystemClock.uptimeMillis();

Просмотреть файл

@ -88,14 +88,11 @@ public enum ReactMarkerConstants {
CREATE_MC_MODULE_GET_METADATA_END,
REGISTER_JS_SEGMENT_START,
REGISTER_JS_SEGMENT_STOP,
<<<<<<< HEAD
BYTECODE_CREATION_FAILED,
BYTECODE_READ_FAILED,
BYTECODE_WRITE_FAILED,
=======
VM_INIT,
ON_FRAGMENT_CREATE,
JAVASCRIPT_EXECUTOR_FACTORY_INJECT_START,
JAVASCRIPT_EXECUTOR_FACTORY_INJECT_END,
>>>>>>> v0.58.6
}

Просмотреть файл

@ -7,7 +7,6 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
<<<<<<< HEAD
# Flag to enable V8 in react-native code
V8_ENABLED := 1
@ -16,11 +15,6 @@ LOCAL_MODULE := jscexecutor
ifeq ($(V8_ENABLED), 0)
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
endif
=======
LOCAL_MODULE := jscexecutor
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
>>>>>>> v0.58.6
LOCAL_C_INCLUDES := $(LOCAL_PATH)
@ -29,8 +23,4 @@ LOCAL_CFLAGS += -fvisibility=hidden -fexceptions -frtti
LOCAL_STATIC_LIBRARIES := libjsi libjsireact
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libreactnativejni
<<<<<<< HEAD
include $(BUILD_SHARED_LIBRARY)
=======
include $(BUILD_SHARED_LIBRARY)
>>>>>>> v0.58.6

Просмотреть файл

@ -30,7 +30,3 @@ import com.facebook.soloader.SoLoader;
private static native HybridData initHybrid(ReadableNativeMap jscConfig);
}
<<<<<<< HEAD
=======
>>>>>>> v0.58.6

Просмотреть файл

@ -33,8 +33,4 @@ public class JSCExecutorFactory implements JavaScriptExecutorFactory {
public String toString() {
return "JSIExecutor+JSCRuntime";
}
}
<<<<<<< HEAD
=======
>>>>>>> v0.58.6
}

Просмотреть файл

@ -16,10 +16,7 @@ public class ReactModuleInfo {
private final boolean mNeedsEagerInit;
private final boolean mHasConstants;
private final boolean mIsCxxModule;
<<<<<<< HEAD
=======
private String mClassName;
>>>>>>> v0.58.6
public ReactModuleInfo(
String name,

Просмотреть файл

@ -5,9 +5,6 @@
package com.facebook.react.module.processing;
<<<<<<< HEAD
import com.facebook.react.bridge.CxxModuleWrapper;
=======
import static javax.lang.model.element.Modifier.PUBLIC;
import static javax.tools.Diagnostic.Kind.ERROR;
@ -30,7 +27,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
>>>>>>> v0.58.6
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
import javax.annotation.processing.Messager;
@ -157,11 +153,6 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
} else {
builder.addStatement("$T map = new $T()", MAP_TYPE, INSTANTIATED_MAP_TYPE);
<<<<<<< HEAD
TypeMirror cxxModuleWrapperTypeMirror = mElements.getTypeElement(CxxModuleWrapper.class.getName()).asType();
=======
>>>>>>> v0.58.6
for (String nativeModule : nativeModules) {
String keyString = nativeModule;
@ -191,11 +182,6 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
name -> name.contentEquals("getConstants") || name.contentEquals("getTypedExportedConstants"));
}
<<<<<<< HEAD
boolean isCxxModule = mTypes.isAssignable(typeElement.asType(), cxxModuleWrapperTypeMirror);
=======
>>>>>>> v0.58.6
String valueString = new StringBuilder()
.append("new ReactModuleInfo(")
.append("\"").append(reactModule.name()).append("\"").append(", ")
@ -203,11 +189,7 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
.append(reactModule.canOverrideExistingModule()).append(", ")
.append(reactModule.needsEagerInit()).append(", ")
.append(hasConstants).append(", ")
<<<<<<< HEAD
.append(isCxxModule)
=======
.append(reactModule.isCxxModule())
>>>>>>> v0.58.6
.append(")")
.toString();

Просмотреть файл

@ -29,29 +29,6 @@ public class AccessibilityDelegateUtil {
*/
public enum AccessibilityRole {
<<<<<<< HEAD:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
NONE(null),
BUTTON("android.widget.Button"),
LINK("android.widget.ViewGroup"),
SEARCH("android.widget.EditText"),
IMAGE("android.widget.ImageView"),
IMAGEBUTTON("android.widget.ImageView"),
KEYBOARDKEY("android.inputmethodservice.Keyboard$Key"),
TEXT("android.widget.ViewGroup"),
ADJUSTABLE("android.widget.SeekBar"),
SUMMARY("android.widget.ViewGroup"),
HEADER("android.widget.ViewGroup");
@Nullable private final String mValue;
AccessibilityRole(String type) {
mValue = type;
}
@Nullable
public String getValue() {
return mValue;
=======
NONE,
BUTTON,
LINK,
@ -91,7 +68,6 @@ public class AccessibilityDelegateUtil {
default:
throw new IllegalArgumentException("Invalid accessibility role value: " + role);
}
>>>>>>> v0.58.6:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
}
public static AccessibilityRole fromValue(@Nullable String value) {
@ -109,11 +85,9 @@ public class AccessibilityDelegateUtil {
}
public static void setDelegate(final View view) {
<<<<<<< HEAD:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
=======
final String accessibilityHint = (String) view.getTag(R.id.accessibility_hint);
final AccessibilityRole accessibilityRole = (AccessibilityRole) view.getTag(R.id.accessibility_role);
>>>>>>> v0.58.6:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
// if a view already has an accessibility delegate, replacing it could cause problems,
// so leave it alone.
if (!ViewCompat.hasAccessibilityDelegate(view) &&
@ -125,11 +99,6 @@ public class AccessibilityDelegateUtil {
public void onInitializeAccessibilityNodeInfo(
View host, AccessibilityNodeInfoCompat info) {
super.onInitializeAccessibilityNodeInfo(host, info);
<<<<<<< HEAD:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
String accessibilityHint = (String) view.getTag(R.id.accessibility_hint);
AccessibilityRole accessibilityRole = getAccessibilityRole((String) view.getTag(R.id.accessibility_role));
=======
>>>>>>> v0.58.6:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
setRole(info, accessibilityRole, view.getContext());
if (!(accessibilityHint == null)) {
String contentDescription=(String)info.getContentDescription();
@ -177,17 +146,4 @@ public class AccessibilityDelegateUtil {
nodeInfo.setClickable(true);
}
}
<<<<<<< HEAD:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
/**
* Method for setting accessibilityRole on view properties.
*/
public static AccessibilityRole getAccessibilityRole(String role) {
if (role == null) {
return AccessibilityRole.NONE;
}
return AccessibilityRole.valueOf(role.toUpperCase());
}
=======
>>>>>>> v0.58.6:ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java
}

Просмотреть файл

@ -11,11 +11,7 @@ import android.view.View;
import android.view.ViewParent;
import com.facebook.react.R;
import com.facebook.react.bridge.ReadableArray;
<<<<<<< HEAD
import com.facebook.react.bridge.ReadableMap;
=======
import com.facebook.react.uimanager.AccessibilityDelegateUtil.AccessibilityRole;
>>>>>>> v0.58.6
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.util.ReactFindViewUtil;
import java.util.Locale;
@ -145,19 +141,7 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
if (accessibilityRole == null) {
return;
}
<<<<<<< HEAD
try {
AccessibilityDelegateUtil.AccessibilityRole.valueOf(accessibilityRole.toUpperCase());
} catch (NullPointerException e) {
throw new IllegalArgumentException("Invalid Role " + accessibilityRole + " Passed In");
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Invalid Role " + accessibilityRole + " Passed In");
}
view.setTag(R.id.accessibility_role, accessibilityRole);
=======
view.setTag(R.id.accessibility_role, AccessibilityRole.fromValue(accessibilityRole));
>>>>>>> v0.58.6
}
@ReactProp(name = PROP_ACCESSIBILITY_STATES)

Просмотреть файл

@ -876,17 +876,8 @@ public class UIViewOperationQueue {
mOperations.add(new SendAccessibilityEvent(tag, eventType));
}
<<<<<<< HEAD
public void enqueuePerformAccessibilityAction(int tag, int action) {
mOperations.add(new PerformAccessibilityAction(tag, action));
}
public void enqueueAnnounceForAccessibility(int tag, String announcement) {
mOperations.add(new AnnounceForAccessibility(tag, announcement));
=======
public void enqueueLayoutUpdateFinished(ReactShadowNode node, UIImplementation.LayoutUpdateListener listener) {
mOperations.add(new LayoutUpdateFinishedOperation(node, listener));
>>>>>>> v0.58.6
}
public void enqueueUIBlock(UIBlock block) {

Просмотреть файл

@ -73,11 +73,8 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
private int mSnapInterval = 0;
private float mDecelerationRate = 0.985f;
private @Nullable List<Integer> mSnapOffsets;
<<<<<<< HEAD
=======
private boolean mSnapToStart = true;
private boolean mSnapToEnd = true;
>>>>>>> v0.58.6
private ReactViewBackgroundManager mReactBackgroundManager;
private boolean mPagedArrowScrolling = false;
@ -180,8 +177,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
mSnapOffsets = snapOffsets;
}
<<<<<<< HEAD
=======
public void setSnapToStart(boolean snapToStart) {
mSnapToStart = snapToStart;
}
@ -190,7 +185,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
mSnapToEnd = snapToEnd;
}
>>>>>>> v0.58.6
public void flashScrollIndicators() {
awakenScrollBars();
}
@ -427,11 +421,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
final int correctedVelocityX = (int)(Math.abs(velocityX) * Math.signum(mOnScrollDispatchHelper.getXFlingVelocity()));
if (mPagingEnabled) {
<<<<<<< HEAD
flingAndSnap(velocityX);
=======
flingAndSnap(correctedVelocityX);
>>>>>>> v0.58.6
} else if (mScroller != null) {
// FB SCROLLVIEW CHANGE
@ -446,11 +436,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
mScroller.fling(
getScrollX(), // startX
getScrollY(), // startY
<<<<<<< HEAD
velocityX, // velocityX
=======
correctedVelocityX, // velocityX
>>>>>>> v0.58.6
0, // velocityY
0, // minX
Integer.MAX_VALUE, // maxX
@ -734,12 +720,9 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
// get the nearest snap points to the target offset
if (mSnapOffsets != null) {
<<<<<<< HEAD
=======
firstOffset = mSnapOffsets.get(0);
lastOffset = mSnapOffsets.get(mSnapOffsets.size() - 1);
>>>>>>> v0.58.6
for (int i = 0; i < mSnapOffsets.size(); i ++) {
int offset = mSnapOffsets.get(i);
@ -759,11 +742,7 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
double interval = (double) getSnapInterval();
double ratio = (double) targetOffset / interval;
smallerOffset = (int) (Math.floor(ratio) * interval);
<<<<<<< HEAD
largerOffset = (int) (Math.ceil(ratio) * interval);
=======
largerOffset = Math.min((int) (Math.ceil(ratio) * interval), maximumOffset);
>>>>>>> v0.58.6
}
// Calculate the nearest offset
@ -771,12 +750,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
? smallerOffset
: largerOffset;
<<<<<<< HEAD
// Chose the correct snap offset based on velocity
if (velocityX > 0) {
targetOffset = largerOffset;
} else if (velocityX < 0) {
=======
// if scrolling after the last snap offset and snapping to the
// end of the list is disabled, then we allow free scrolling
int currentOffset = getScrollX();
@ -805,8 +778,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
} else if (velocityX < 0) {
// when snapping velocity can feel sluggish for slow swipes
velocityX -= (int) ((targetOffset - smallerOffset) * 10.0);
>>>>>>> v0.58.6
targetOffset = smallerOffset;
} else {
targetOffset = nearestOffset;
@ -849,32 +820,6 @@ public class ReactHorizontalScrollView extends HorizontalScrollView implements
} else {
smoothScrollTo(targetOffset, getScrollY());
}
<<<<<<< HEAD
}
private void smoothScrollToNextPage(int direction) {
int width = getWidth();
int currentX = getScrollX();
int page = currentX / width;
if (currentX % width != 0) {
page++;
}
if (direction == View.FOCUS_LEFT) {
page = page - 1;
} else {
page = page + 1;
}
if (page < 0) {
page = 0;
}
smoothScrollTo(page * width, getScrollY());
handlePostTouchScrolling(0, 0);
=======
>>>>>>> v0.58.6
}
@Override

Просмотреть файл

@ -97,8 +97,6 @@ public class ReactHorizontalScrollViewManager
view.setSnapOffsets(offsets);
}
<<<<<<< HEAD
=======
@ReactProp(name = "snapToStart")
public void setSnapToStart(ReactHorizontalScrollView view, boolean snapToStart) {
view.setSnapToStart(snapToStart);
@ -109,7 +107,6 @@ public class ReactHorizontalScrollViewManager
view.setSnapToEnd(snapToEnd);
}
>>>>>>> v0.58.6
@ReactProp(name = ReactClippingViewGroupHelper.PROP_REMOVE_CLIPPED_SUBVIEWS)
public void setRemoveClippedSubviews(ReactHorizontalScrollView view, boolean removeClippedSubviews) {
view.setRemoveClippedSubviews(removeClippedSubviews);

Просмотреть файл

@ -55,10 +55,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
private boolean mActivelyScrolling;
private @Nullable Rect mClippingRect;
<<<<<<< HEAD
=======
private @Nullable String mOverflow = ViewProps.HIDDEN;
>>>>>>> v0.58.6
private boolean mDragging;
private boolean mPagingEnabled = false;
private @Nullable Runnable mPostTouchRunnable;
@ -72,11 +69,8 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
private int mSnapInterval = 0;
private float mDecelerationRate = 0.985f;
private @Nullable List<Integer> mSnapOffsets;
<<<<<<< HEAD
=======
private boolean mSnapToStart = true;
private boolean mSnapToEnd = true;
>>>>>>> v0.58.6
private View mContentView;
private ReactViewBackgroundManager mReactBackgroundManager;
@ -165,8 +159,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
mSnapOffsets = snapOffsets;
}
<<<<<<< HEAD
=======
public void setSnapToStart(boolean snapToStart) {
mSnapToStart = snapToStart;
}
@ -175,7 +167,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
mSnapToEnd = snapToEnd;
}
>>>>>>> v0.58.6
public void flashScrollIndicators() {
awakenScrollBars();
}
@ -347,10 +338,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
@Override
public void fling(int velocityY) {
<<<<<<< HEAD
if (mPagingEnabled) {
flingAndSnap(velocityY);
=======
// Workaround.
// On Android P if a ScrollView is inverted, we will get a wrong sign for
// velocityY (see https://issuetracker.google.com/issues/112385925).
@ -363,7 +350,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
if (mPagingEnabled) {
flingAndSnap(correctedVelocityY);
>>>>>>> v0.58.6
} else if (mScroller != null) {
// FB SCROLLVIEW CHANGE
@ -379,11 +365,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
getScrollX(), // startX
getScrollY(), // startY
0, // velocityX
<<<<<<< HEAD
velocityY, // velocityY
=======
correctedVelocityY, // velocityY
>>>>>>> v0.58.6
0, // minX
0, // maxX
0, // minY
@ -396,15 +378,9 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
// END FB SCROLLVIEW CHANGE
} else {
<<<<<<< HEAD
super.fling(velocityY);
}
handlePostTouchScrolling(0, velocityY);
=======
super.fling(correctedVelocityY);
}
handlePostTouchScrolling(0, correctedVelocityY);
>>>>>>> v0.58.6
}
private void enableFpsListener() {
@ -610,12 +586,9 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
// get the nearest snap points to the target offset
if (mSnapOffsets != null) {
<<<<<<< HEAD
=======
firstOffset = mSnapOffsets.get(0);
lastOffset = mSnapOffsets.get(mSnapOffsets.size() - 1);
>>>>>>> v0.58.6
for (int i = 0; i < mSnapOffsets.size(); i ++) {
int offset = mSnapOffsets.get(i);
@ -635,11 +608,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
double interval = (double) getSnapInterval();
double ratio = (double) targetOffset / interval;
smallerOffset = (int) (Math.floor(ratio) * interval);
<<<<<<< HEAD
largerOffset = (int) (Math.ceil(ratio) * interval);
=======
largerOffset = Math.min((int) (Math.ceil(ratio) * interval), maximumOffset);
>>>>>>> v0.58.6
}
// Calculate the nearest offset
@ -647,12 +616,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
? smallerOffset
: largerOffset;
<<<<<<< HEAD
// Chose the correct snap offset based on velocity
if (velocityY > 0) {
targetOffset = largerOffset;
} else if (velocityY < 0) {
=======
// if scrolling after the last snap offset and snapping to the
// end of the list is disabled, then we allow free scrolling
if (!mSnapToEnd && targetOffset >= lastOffset) {
@ -678,7 +641,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou
// when snapping velocity can feel sluggish for slow swipes
velocityY -= (int) ((targetOffset - smallerOffset) * 10.0);
>>>>>>> v0.58.6
targetOffset = smallerOffset;
} else {
targetOffset = nearestOffset;

Просмотреть файл

@ -105,8 +105,6 @@ public class ReactScrollViewManager
view.setSnapOffsets(offsets);
}
<<<<<<< HEAD
=======
@ReactProp(name = "snapToStart")
public void setSnapToStart(ReactScrollView view, boolean snapToStart) {
view.setSnapToStart(snapToStart);
@ -117,7 +115,6 @@ public class ReactScrollViewManager
view.setSnapToEnd(snapToEnd);
}
>>>>>>> v0.58.6
@ReactProp(name = ReactClippingViewGroupHelper.PROP_REMOVE_CLIPPED_SUBVIEWS)
public void setRemoveClippedSubviews(ReactScrollView view, boolean removeClippedSubviews) {
view.setRemoveClippedSubviews(removeClippedSubviews);

Просмотреть файл

@ -8,23 +8,6 @@
package com.facebook.react.views.webview;
import android.annotation.TargetApi;
<<<<<<< HEAD
import android.content.Context;
import com.facebook.react.uimanager.UIManagerModule;
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
=======
>>>>>>> v0.58.6
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@ -351,13 +334,8 @@ public class ReactWebViewManager extends SimpleViewManager<WebView> {
public void callInjectedJavaScript() {
if (getSettings().getJavaScriptEnabled() &&
<<<<<<< HEAD
injectedJS != null &&
!TextUtils.isEmpty(injectedJS)) {
=======
injectedJS != null &&
!TextUtils.isEmpty(injectedJS)) {
>>>>>>> v0.58.6
evaluateJavascriptWithFallback("(function() {\n" + injectedJS + ";\n})();");
}
}

Просмотреть файл

@ -10,9 +10,6 @@ APP_PLATFORM := android-16
APP_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
<<<<<<< HEAD
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_V8_DIR)$(HOST_DIRSEP)$(REACT_V8_DIR)/../v8base$(HOST_DIRSEP)$(REACT_V8_DIR)/../v8platform
=======
# What is NDK_MODULE_PATH?
# This is comparable to the PATH environment variable in Linux. The purpose
# of NDK_MODULE_PATH is to provide a list of directories that contain modules
@ -25,8 +22,8 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE
# Where are APP_MK_DIR, THIRD_PARTY_NDK_DIR, etc. defined?
# The directories inside NDK_MODULE_PATH (ex: APP_MK_DIR, THIRD_PARTY_NDK_DIR,
# etc.) are defined inside build.gradle.
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_SRC_DIR)
>>>>>>> v0.58.6
NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSEP)$(REACT_COMMON_DIR)$(HOST_DIRSEP)$(APP_MK_DIR)first-party$(HOST_DIRSEP)$(REACT_V8_DIR)$(HOST_DIRSEP)$(REACT_V8_DIR)/../v8base$(HOST_DIRSEP)$(REACT_V8_DIR)/../v8platform
APP_STL := gnustl_shared

Просмотреть файл

@ -7,7 +7,6 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
<<<<<<< HEAD
# Flag to enable V8 in react-native code
V8_ENABLED := 1
@ -36,9 +35,6 @@ LOCAL_SRC_FILES := \
WritableNativeArray.cpp \
WritableNativeMap.cpp \
=======
# Include . in the header search path for all source files in this module.
>>>>>>> v0.58.6
LOCAL_C_INCLUDES := $(LOCAL_PATH)
# Include ./../../ in the header search path for modules that depend on
@ -48,20 +44,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
# ./../ == react
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
<<<<<<< HEAD
LOCAL_CFLAGS += -fvisibility=hidden
LOCAL_CXXFLAGS := -fexceptions -frtti
LOCAL_LDLIBS += -landroid
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libglog_init libyoga libprivatedata
LOCAL_V8_FILES := \
AndroidV8Factory.cpp
LOCAL_JSC_FILES := \
AndroidJSCFactory.cpp \
JSCPerfLogging.cpp \
JSLogging.cpp
ifeq ($(V8_ENABLED), 1)
LOCAL_SRC_FILES += $(LOCAL_V8_FILES)
@ -72,18 +60,16 @@ else
LOCAL_SHARED_LIBRARIES += libjsc
endif
=======
LOCAL_CFLAGS += -fvisibility=hidden
LOCAL_CFLAGS += -fexceptions -frtti
LOCAL_LDLIBS += -landroid
# The dynamic libraries (.so files) that this module depends on.
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libjsc libglog_init libyoga
LOCAL_SHARED_LIBRARIES := libfolly_json libfb libglog_init libyoga
# The static libraries (.a files) that this module depends on.
>>>>>>> v0.58.6
LOCAL_STATIC_LIBRARIES := libreactnative
APP_ALLOW_MISSING_DEPS :=true
# Name of this module.
#
@ -91,8 +77,7 @@ APP_ALLOW_MISSING_DEPS :=true
# LOCAL_SHARED_LIBRARIES variable.
LOCAL_MODULE := reactnativejni
# Compile all local c++ files.
LOCAL_SRC_FILES := $(wildcard *.cpp)
APP_ALLOW_MISSING_DEPS :=true
# Build the files in this directory as a shared library
include $(BUILD_SHARED_LIBRARY)
@ -110,19 +95,14 @@ include $(BUILD_SHARED_LIBRARY)
# tell andorid-ndk to compile the module in <dir>/<module-dir> according
# to the specification inside <dir>/<module-dir>/Android.mk.
$(call import-module,folly)
<<<<<<< HEAD
ifeq ($(V8_ENABLED), 0)
$(call import-module,jsc)
endif
$(call import-module,yogajni)
=======
$(call import-module,fb)
$(call import-module,jsc)
$(call import-module,fbgloginit)
$(call import-module,yogajni)
$(call import-module,cxxreact)
>>>>>>> v0.58.6
$(call import-module,jsi)
$(call import-module,jsiexecutor)
# TODO(ramanpreet):
@ -130,7 +110,4 @@ $(call import-module,jsiexecutor)
# $(call import-module,jscexecutor)
include $(REACT_SRC_DIR)/jscexecutor/Android.mk
<<<<<<< HEAD
include $(REACT_SRC_DIR)/v8executor/Android.mk
=======
>>>>>>> v0.58.6
include $(REACT_SRC_DIR)/v8executor/Android.mk

Просмотреть файл

@ -11,12 +11,8 @@
#include <fb/fbjni.h>
#include <fb/log.h>
#include <folly/Memory.h>
<<<<<<< HEAD
#include <fb/fbjni.h>
#include <jschelpers/JSException.h>
=======
>>>>>>> v0.58.6
#include <jsi/jsi.h>
#include "JNativeRunnable.h"
@ -42,11 +38,8 @@ std::function<void()> wrapRunnable(std::function<void()>&& runnable) {
return [runnable=std::move(runnable)] {
try {
runnable();
<<<<<<< HEAD
} catch (const JSException& ex) {
throwNewJavaException(JavaJSException::create(ex.what(), ex.getStack().c_str(), ex).get());
=======
>>>>>>> v0.58.6
} catch (const jsi::JSError& ex) {
throwNewJavaException(
JavaJSException::create(ex.getMessage().c_str(), ex.getStack().c_str(), ex)

Просмотреть файл

@ -53,7 +53,6 @@ void JReactMarker::logPerfMarker(const ReactMarker::ReactMarkerId markerId, cons
case ReactMarker::NATIVE_MODULE_SETUP_STOP:
JReactMarker::logMarker("NATIVE_MODULE_SETUP_END", tag);
break;
<<<<<<< HEAD
case ReactMarker::BYTECODE_CREATION_FAILED:
JReactMarker::logMarker("BYTECODE_CREATION_FAILED");
break;
@ -62,8 +61,7 @@ void JReactMarker::logPerfMarker(const ReactMarker::ReactMarkerId markerId, cons
break;
case ReactMarker::BYTECODE_WRITE_FAILED:
JReactMarker::logMarker("BYTECODE_WRITE_FAILED");
=======
>>>>>>> v0.58.6
break;
case ReactMarker::REGISTER_JS_SEGMENT_START:
JReactMarker::logMarker("REGISTER_JS_SEGMENT_START", tag);
break;

Просмотреть файл

@ -2,39 +2,24 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
<<<<<<< HEAD
folly/json.cpp \
folly/Unicode.cpp \
folly/Conv.cpp \
folly/Demangle.cpp \
folly/detail/MallocImpl.cpp \
folly/StringBase.cpp \
folly/dynamic.cpp \
folly/ScopeGuard.cpp \
=======
folly/json.cpp \
folly/Unicode.cpp \
folly/Conv.cpp \
folly/Demangle.cpp \
folly/memory/detail/MallocImpl.cpp \
folly/detail/MallocImpl.cpp \
folly/String.cpp \
folly/dynamic.cpp \
folly/Format.cpp \
folly/json_pointer.cpp \
# folly/json_pointer.cpp \
folly/lang/ColdClass.cpp \
folly/detail/Demangle.cpp \
folly/hash/SpookyHashV2.cpp \
folly/container/detail/F14Table.cpp \
folly/ScopeGuard.cpp \
>>>>>>> v0.58.6
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
<<<<<<< HEAD
LOCAL_CFLAGS += -fno-omit-frame-pointer
LOCAL_CXXFLAGS+= -frtti -fexceptions
=======
LOCAL_CFLAGS += -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare
FOLLY_FLAGS := \
@ -44,8 +29,7 @@ FOLLY_FLAGS := \
# If APP_PLATFORM in Application.mk targets android-23 above, please comment this line.
# NDK uses GNU style stderror_r() after API 23.
FOLLY_FLAGS += -DFOLLY_HAVE_XSI_STRERROR_R=1
>>>>>>> v0.58.6
# FOLLY_FLAGS += -DFOLLY_HAVE_XSI_STRERROR_R=1
LOCAL_CFLAGS += $(FOLLY_FLAGS)

Просмотреть файл

@ -13,11 +13,7 @@ LOCAL_SRC_FILES := \
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog/src/
<<<<<<< HEAD
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/glog/src/
=======
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/exported
>>>>>>> v0.58.6
LOCAL_CFLAGS += \
-Wno-unused-variable \

Просмотреть файл

@ -9,7 +9,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := reactnative
<<<<<<< HEAD
# Flag to enable V8 in react-native code
V8_ENABLED := 1
@ -20,7 +19,7 @@ LOCAL_SRC_FILES := \
JSBigString.cpp \
JSBundleType.cpp \
JSDeltaBundleClient.cpp \
JSExecutor.cpp \
JSExecutor.cpp \
JSIndexedRAMBundle.cpp \
MethodCall.cpp \
ModuleRegistry.cpp \
@ -28,9 +27,6 @@ LOCAL_SRC_FILES := \
Platform.cpp \
RAMBundleRegistry.cpp \
ReactMarker.cpp \
=======
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
>>>>>>> v0.58.6
LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
@ -38,6 +34,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := \
-DLOG_TAG=\"ReactNative\"
LOCAL_STATIC_LIBRARIES := boost
LOCAL_SHARED_LIBRARIES := libfb libfolly_json libglog
LOCAL_CXXFLAGS += -fexceptions -frtti
@ -56,7 +53,6 @@ LOCAL_JSC_FILES := \
JSCTracing.cpp \
JSCUtils.cpp \
<<<<<<< HEAD
ifeq ($(V8_ENABLED), 1)
LOCAL_SRC_FILES += $(LOCAL_V8_FILES)
LOCAL_CFLAGS += -DV8_ENABLED=1
@ -68,10 +64,7 @@ else
LOCAL_STATIC_LIBRARIES := jschelpers
LOCAL_SHARED_LIBRARIES += libjsc
endif
=======
LOCAL_STATIC_LIBRARIES := boost
LOCAL_SHARED_LIBRARIES := jsinspector libfolly_json glog
>>>>>>> v0.58.6
include $(BUILD_STATIC_LIBRARY)
@ -79,8 +72,6 @@ $(call import-module,fb)
$(call import-module,folly)
$(call import-module,glog)
$(call import-module,jsinspector)
<<<<<<< HEAD
$(call import-module,privatedata)
ifeq ($(V8_ENABLED),1)
$(call import-module,v8)
$(call import-module,v8base)
@ -89,6 +80,4 @@ ifeq ($(V8_ENABLED),1)
else
$(call import-module,jsc)
$(call import-module,jschelpers)
endif
=======
>>>>>>> v0.58.6
endif

Просмотреть файл

@ -27,11 +27,7 @@ struct MethodCall {
, callId(cid) {}
};
<<<<<<< HEAD
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& calls) /* throw(std::invalid_argument) */;
=======
/// \throws std::invalid_argument
std::vector<MethodCall> parseMethodCalls(folly::dynamic&& calls);
>>>>>>> v0.58.6
} }

Просмотреть файл

@ -172,12 +172,9 @@ void NativeToJsBridge::callFunction(
TRACE_TAG_REACT_CXX_BRIDGE,
"JSCall",
systraceCookie);
<<<<<<< HEAD
=======
SystraceSection s("NativeToJsBridge::callFunction", "module", module, "method", method);
#else
(void)(systraceCookie);
>>>>>>> v0.58.6
#endif
SystraceSection s("NativeToJsBridge::callFunction", "module", module, "method", method);
// This is safe because we are running on the executor's thread: it won't

Просмотреть файл

@ -24,14 +24,10 @@ enum ReactMarkerId {
NATIVE_MODULE_SETUP_START,
NATIVE_MODULE_SETUP_STOP,
REGISTER_JS_SEGMENT_START,
<<<<<<< HEAD
REGISTER_JS_SEGMENT_STOP,
BYTECODE_CREATION_FAILED,
BYTECODE_READ_FAILED,
BYTECODE_WRITE_FAILED
=======
REGISTER_JS_SEGMENT_STOP
>>>>>>> v0.58.6
};
#ifdef __APPLE__

Просмотреть файл

@ -7,7 +7,6 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
<<<<<<< HEAD
# Flag to enable V8 in react-native code
V8_ENABLED := 1
@ -41,16 +40,5 @@ else
LOCAL_SRC_FILES += $(LOCAL_JSC_FILES)
LOCAL_SHARED_LIBRARIES += libjsc
endif
=======
LOCAL_MODULE := jsi
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := -fexceptions -frtti -O3
LOCAL_SHARED_LIBRARIES := libfolly_json libjsc glog
>>>>>>> v0.58.6
include $(BUILD_STATIC_LIBRARY)

Просмотреть файл

@ -13,13 +13,7 @@
#include <string>
#include <vector>
<<<<<<< HEAD
#ifndef JSI_EXPORT
#define JSI_EXPORT __attribute__((visibility("default")))
#endif
=======
#define JSI_EXPORT __attribute__((visibility("default")))
>>>>>>> v0.58.6
class FBJSRuntime;
namespace facebook {
@ -294,16 +288,10 @@ class Pointer {
friend class Runtime;
friend class Value;
<<<<<<< HEAD
typename Runtime::PointerValue* ptr_;
public:
explicit Pointer(Runtime::PointerValue* ptr) : ptr_(ptr) {}
=======
explicit Pointer(Runtime::PointerValue* ptr) : ptr_(ptr) {}
typename Runtime::PointerValue* ptr_;
>>>>>>> v0.58.6
};
/// Represents something that can be a JS property key. Movable, not copyable.
@ -311,14 +299,8 @@ class PropNameID : public Pointer {
public:
using Pointer::Pointer;
<<<<<<< HEAD
// TODO :: Temporary hack/divergence from Github copy due to a bug in MSVC compiler which is fixed in VS2019.
PropNameID(Runtime& runtime, const PropNameID& other)
: Pointer(runtime.clonePropNameID(other.ptr_)) {}
=======
PropNameID(Runtime& runtime, const PropNameID& other)
: PropNameID(runtime.clonePropNameID(other.ptr_)) {}
>>>>>>> v0.58.6
PropNameID(PropNameID&& other) = default;
PropNameID& operator=(PropNameID&& other) = default;

Просмотреть файл

@ -45,8 +45,6 @@ typedef struct YGValue {
extern const YGValue YGValueUndefined;
extern const YGValue YGValueAuto;
<<<<<<< HEAD
=======
#ifdef __cplusplus
YG_EXTERN_C_END
@ -57,7 +55,6 @@ extern bool operator!=(const YGValue& lhs, const YGValue& rhs);
YG_EXTERN_C_BEGIN
#endif
>>>>>>> v0.58.6
typedef struct YGConfig* YGConfigRef;

Просмотреть файл

@ -3,9 +3,6 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
<<<<<<< HEAD
include ':ReactAndroid', ':processor',':RNTester:android:app'
=======
include ':ReactAndroid'
include ':processor'
include ':RNTester:android:app'
>>>>>>> v0.58.6