From 3cd60002baad7943bf931023d4c1fe9f1224942c Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 30 Nov 2015 13:59:58 -0800 Subject: [PATCH] add symlinks to binding source --- tests/react-test-app/android/app/build.gradle | 1 + .../android/app/src/main/jni/js_init.cpp | 1 + .../android/app/src/main/jni/js_init.h | 1 + .../android/app/src/main/jni/js_list.cpp | 1 + .../android/app/src/main/jni/js_list.hpp | 1 + .../android/app/src/main/jni/js_object.cpp | 1 + .../android/app/src/main/jni/js_object.hpp | 1 + .../android/app/src/main/jni/js_realm.cpp | 1 + .../android/app/src/main/jni/js_realm.hpp | 1 + .../android/app/src/main/jni/js_results.cpp | 1 + .../android/app/src/main/jni/js_results.hpp | 1 + .../android/app/src/main/jni/js_schema.cpp | 1 + .../android/app/src/main/jni/js_schema.hpp | 1 + .../android/app/src/main/jni/js_util.cpp | 1 + .../android/app/src/main/jni/js_util.hpp | 1 + .../android/app/src/main/jni/platform.hpp | 1 + .../app/src/main/jni/realm-react-android.c | 63 +++++++++++++++++++ .../android/app/src/main/jni/rpc.cpp | 1 + .../android/app/src/main/jni/rpc.hpp | 1 + tests/react-test-app/android/build.gradle | 2 +- 20 files changed, 82 insertions(+), 1 deletion(-) create mode 120000 tests/react-test-app/android/app/src/main/jni/js_init.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_init.h create mode 120000 tests/react-test-app/android/app/src/main/jni/js_list.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_list.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_object.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_object.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_realm.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_realm.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_results.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_results.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_schema.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_schema.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_util.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/js_util.hpp create mode 120000 tests/react-test-app/android/app/src/main/jni/platform.hpp create mode 100644 tests/react-test-app/android/app/src/main/jni/realm-react-android.c create mode 120000 tests/react-test-app/android/app/src/main/jni/rpc.cpp create mode 120000 tests/react-test-app/android/app/src/main/jni/rpc.hpp diff --git a/tests/react-test-app/android/app/build.gradle b/tests/react-test-app/android/app/build.gradle index a3ec8725..fbd478e3 100644 --- a/tests/react-test-app/android/app/build.gradle +++ b/tests/react-test-app/android/app/build.gradle @@ -60,6 +60,7 @@ android { versionCode 1 versionName "1.0" ndk { + moduleName = "realm-react-android" abiFilters "armeabi-v7a", "x86" } } diff --git a/tests/react-test-app/android/app/src/main/jni/js_init.cpp b/tests/react-test-app/android/app/src/main/jni/js_init.cpp new file mode 120000 index 00000000..5dbc34bd --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_init.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_init.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_init.h b/tests/react-test-app/android/app/src/main/jni/js_init.h new file mode 120000 index 00000000..904b6881 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_init.h @@ -0,0 +1 @@ +../../../../../../../src/js_init.h \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_list.cpp b/tests/react-test-app/android/app/src/main/jni/js_list.cpp new file mode 120000 index 00000000..5a9624cd --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_list.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_list.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_list.hpp b/tests/react-test-app/android/app/src/main/jni/js_list.hpp new file mode 120000 index 00000000..66870d89 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_list.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_list.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_object.cpp b/tests/react-test-app/android/app/src/main/jni/js_object.cpp new file mode 120000 index 00000000..77cd10b6 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_object.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_object.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_object.hpp b/tests/react-test-app/android/app/src/main/jni/js_object.hpp new file mode 120000 index 00000000..ee70b698 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_object.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_object.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_realm.cpp b/tests/react-test-app/android/app/src/main/jni/js_realm.cpp new file mode 120000 index 00000000..bfb79f5b --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_realm.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_realm.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_realm.hpp b/tests/react-test-app/android/app/src/main/jni/js_realm.hpp new file mode 120000 index 00000000..6ee625aa --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_realm.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_realm.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_results.cpp b/tests/react-test-app/android/app/src/main/jni/js_results.cpp new file mode 120000 index 00000000..adc6fb57 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_results.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_results.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_results.hpp b/tests/react-test-app/android/app/src/main/jni/js_results.hpp new file mode 120000 index 00000000..0f6d3f19 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_results.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_results.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_schema.cpp b/tests/react-test-app/android/app/src/main/jni/js_schema.cpp new file mode 120000 index 00000000..f28579e2 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_schema.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_schema.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_schema.hpp b/tests/react-test-app/android/app/src/main/jni/js_schema.hpp new file mode 120000 index 00000000..9094c9e2 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_schema.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_schema.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_util.cpp b/tests/react-test-app/android/app/src/main/jni/js_util.cpp new file mode 120000 index 00000000..31806c26 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_util.cpp @@ -0,0 +1 @@ +../../../../../../../src/js_util.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/js_util.hpp b/tests/react-test-app/android/app/src/main/jni/js_util.hpp new file mode 120000 index 00000000..868d03f3 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/js_util.hpp @@ -0,0 +1 @@ +../../../../../../../src/js_util.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/platform.hpp b/tests/react-test-app/android/app/src/main/jni/platform.hpp new file mode 120000 index 00000000..ec9bfa50 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/platform.hpp @@ -0,0 +1 @@ +../../../../../../../src/platform.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/realm-react-android.c b/tests/react-test-app/android/app/src/main/jni/realm-react-android.c new file mode 100644 index 00000000..48288b6d --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/realm-react-android.c @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#include +#include + +/* This is a trivial JNI example where we use a native method + * to return a new VM String. See the corresponding Java source + * file located at: + * + * apps/samples/hello-jni/project/src/com/example/hellojni/HelloJni.java + */ +jstring +Java_com_nhachicha_reactjni_module_JniToastModule_stringFromJNI( JNIEnv* env, + jobject thiz ) +{ +#if defined(__arm__) + #if defined(__ARM_ARCH_7A__) + #if defined(__ARM_NEON__) + #if defined(__ARM_PCS_VFP) + #define ABI "armeabi-v7a/NEON (hard-float)" + #else + #define ABI "armeabi-v7a/NEON" + #endif + #else + #if defined(__ARM_PCS_VFP) + #define ABI "armeabi-v7a (hard-float)" + #else + #define ABI "armeabi-v7a" + #endif + #endif + #else + #define ABI "armeabi" + #endif +#elif defined(__i386__) + #define ABI "x86" +#elif defined(__x86_64__) + #define ABI "x86_64" +#elif defined(__mips64) /* mips64el-* toolchain defines __mips__ too */ + #define ABI "mips64" +#elif defined(__mips__) + #define ABI "mips" +#elif defined(__aarch64__) + #define ABI "arm64-v8a" +#else +#define ABI "unknown" +#endif + + return (*env)->NewStringUTF(env, "Hello from JNI ! Compiled with ABI " ABI "."); +} diff --git a/tests/react-test-app/android/app/src/main/jni/rpc.cpp b/tests/react-test-app/android/app/src/main/jni/rpc.cpp new file mode 120000 index 00000000..14753a54 --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/rpc.cpp @@ -0,0 +1 @@ +../../../../../../../src/rpc.cpp \ No newline at end of file diff --git a/tests/react-test-app/android/app/src/main/jni/rpc.hpp b/tests/react-test-app/android/app/src/main/jni/rpc.hpp new file mode 120000 index 00000000..5009073c --- /dev/null +++ b/tests/react-test-app/android/app/src/main/jni/rpc.hpp @@ -0,0 +1 @@ +../../../../../../../src/rpc.hpp \ No newline at end of file diff --git a/tests/react-test-app/android/build.gradle b/tests/react-test-app/android/build.gradle index ccdfc4e3..53ea195b 100644 --- a/tests/react-test-app/android/build.gradle +++ b/tests/react-test-app/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files