From c6e46b98562acd9637ac67ee36ed0344f75f61d3 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Fri, 15 Jan 2016 11:49:22 -0800 Subject: [PATCH] remove unneded dependencies --- react-native/android/app/build.gradle | 2 +- react-native/android/app/src/main/jni/Android.mk | 7 ++----- react-native/android/app/src/main/jni/jsc/Android.mk | 6 ++++++ react-native/android/app/src/main/jni/react-native | 1 - react-native/android/settings.gradle | 1 - src/android/com_reacttests_RealmReactAndroid.cpp | 7 ++++++- tests/react-test-app/run-android.sh | 1 - 7 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 react-native/android/app/src/main/jni/jsc/Android.mk delete mode 120000 react-native/android/app/src/main/jni/react-native diff --git a/react-native/android/app/build.gradle b/react-native/android/app/build.gradle index 6538ddef..d73d159e 100644 --- a/react-native/android/app/build.gradle +++ b/react-native/android/app/build.gradle @@ -149,7 +149,7 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.KeepSafe:ReLinker:1.1' compile 'org.nanohttpd:nanohttpd:2.2.0' - compile project (':react-native')// this is the locally patched version of Facebook React Native + compile 'com.facebook.react:react-native:0.18.0' compile 'org.webkit:android-jsc:r174650' } diff --git a/react-native/android/app/src/main/jni/Android.mk b/react-native/android/app/src/main/jni/Android.mk index 281006da..ba47cb43 100644 --- a/react-native/android/app/src/main/jni/Android.mk +++ b/react-native/android/app/src/main/jni/Android.mk @@ -8,8 +8,8 @@ include $(PREBUILT_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE:= jsc-$(TARGET_ARCH_ABI) -LOCAL_SRC_FILES := react-native/ReactAndroid/build/third-party-ndk/jsc/jni/$(TARGET_ARCH_ABI)/libjsc.so -LOCAL_EXPORT_C_INCLUDES := react-native/ReactAndroid/build/third-party-ndk/jsc +LOCAL_SRC_FILES := jsc/jni/$(TARGET_ARCH_ABI)/libjsc.so +LOCAL_EXPORT_C_INCLUDES := jsc include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) @@ -43,9 +43,6 @@ LOCAL_C_INCLUDES += src/object-store LOCAL_C_INCLUDES += src/object-store/parser LOCAL_C_INCLUDES += vendor LOCAL_C_INCLUDES += vendor/PEGTL -LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/react -LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/first-party -LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/first-party/fb/include LOCAL_C_INCLUDES += $(JAVA_HOME)/include LOCAL_C_INCLUDES += $(JAVA_HOME)/include/darwin LOCAL_C_INCLUDES += core/include diff --git a/react-native/android/app/src/main/jni/jsc/Android.mk b/react-native/android/app/src/main/jni/jsc/Android.mk new file mode 100644 index 00000000..25462a61 --- /dev/null +++ b/react-native/android/app/src/main/jni/jsc/Android.mk @@ -0,0 +1,6 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) +LOCAL_MODULE:= jsc +LOCAL_SRC_FILES := jni/$(TARGET_ARCH_ABI)/libjsc.so +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) +include $(PREBUILT_SHARED_LIBRARY) \ No newline at end of file diff --git a/react-native/android/app/src/main/jni/react-native b/react-native/android/app/src/main/jni/react-native deleted file mode 120000 index c2fb95e0..00000000 --- a/react-native/android/app/src/main/jni/react-native +++ /dev/null @@ -1 +0,0 @@ -../../../../../../../react-native \ No newline at end of file diff --git a/react-native/android/settings.gradle b/react-native/android/settings.gradle index c056e650..9f0db2e6 100644 --- a/react-native/android/settings.gradle +++ b/react-native/android/settings.gradle @@ -2,4 +2,3 @@ rootProject.name = 'ReactTests' include ':app' include ':react-native' -project(':react-native').projectDir = new File(rootProject.projectDir, '../../../react-native/ReactAndroid') diff --git a/src/android/com_reacttests_RealmReactAndroid.cpp b/src/android/com_reacttests_RealmReactAndroid.cpp index aca05e9f..6e61d192 100644 --- a/src/android/com_reacttests_RealmReactAndroid.cpp +++ b/src/android/com_reacttests_RealmReactAndroid.cpp @@ -6,13 +6,18 @@ #include #include "com_reacttests_RealmReactAndroid.h" -#include "JSCExecutor.h" #include "js_init.h" #include "rpc.hpp" #include "platform.hpp" #include #include +namespace facebook { + namespace react { + class JSCExecutor; + } +} + /* * Class: com_reacttests_RealmReactAndroid * Method: injectRealmJsContext diff --git a/tests/react-test-app/run-android.sh b/tests/react-test-app/run-android.sh index 2bfcc423..5153617a 100755 --- a/tests/react-test-app/run-android.sh +++ b/tests/react-test-app/run-android.sh @@ -1,5 +1,4 @@ #!/bin/bash -cp ../../react-native/android/app/build/outputs/aar/app-debug.aar android/app/lib/ rm -rf node_modules/realm node_modules/realm-tests npm install realm realm-tests cp ../../src/object-store/parser/queryTests.json node_modules/realm-tests/