From 7afdbba2ed2e16eebf8bd868ccd6d8ca163ee005 Mon Sep 17 00:00:00 2001 From: Nabil Hachicha Date: Wed, 10 Feb 2016 02:03:33 +0000 Subject: [PATCH] adding a 'publishAndroid' task to generate the AAR with prebuilt .so files --- .gitignore | 2 +- .../ReactExample/android/app/build.gradle | 2 +- examples/ReactExample/android/settings.gradle | 3 + package.json | 5 +- react-native/android/.npmignore | 2 +- react-native/android/app/build.gradle | 175 -------------- react-native/android/app/gradle.properties | 14 -- react-native/android/app/src/main/jni/src | 1 - react-native/android/app/src/main/jni/vendor | 1 - react-native/android/build.gradle | 213 +++++++++++++++++- react-native/android/gradle.properties | 28 +-- .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../android/{app => }/proguard-rules.pro | 0 react-native/android/publish_android_template | 33 +++ react-native/android/{app => }/release.gradle | 0 react-native/android/settings.gradle | 4 - .../{app => }/src/main/AndroidManifest.xml | 0 .../io/realm/react/RealmReactAndroid.java | 0 .../android/{app => }/src/main/jni/.npmignore | 0 .../android/{app => }/src/main/jni/Android.mk | 0 .../{app => }/src/main/jni/Application.mk | 0 .../{app => }/src/main/jni/jsc/.gitignore | 0 react-native/android/src/main/jni/src | 1 + react-native/android/src/main/jni/vendor | 1 + scripts/.test.sh.swo | Bin 12288 -> 0 bytes scripts/create-symlinks.sh | 18 -- tests/react-test-app/android/app/gradlew | 0 27 files changed, 265 insertions(+), 241 deletions(-) delete mode 100644 react-native/android/app/build.gradle delete mode 100644 react-native/android/app/gradle.properties delete mode 120000 react-native/android/app/src/main/jni/src delete mode 120000 react-native/android/app/src/main/jni/vendor rename react-native/android/{app => }/proguard-rules.pro (100%) create mode 100644 react-native/android/publish_android_template rename react-native/android/{app => }/release.gradle (100%) delete mode 100644 react-native/android/settings.gradle rename react-native/android/{app => }/src/main/AndroidManifest.xml (100%) rename react-native/android/{app => }/src/main/java/io/realm/react/RealmReactAndroid.java (100%) rename react-native/android/{app => }/src/main/jni/.npmignore (100%) rename react-native/android/{app => }/src/main/jni/Android.mk (100%) rename react-native/android/{app => }/src/main/jni/Application.mk (100%) rename react-native/android/{app => }/src/main/jni/jsc/.gitignore (100%) create mode 120000 react-native/android/src/main/jni/src create mode 120000 react-native/android/src/main/jni/vendor delete mode 100644 scripts/.test.sh.swo delete mode 100755 scripts/create-symlinks.sh mode change 100644 => 100755 tests/react-test-app/android/app/gradlew diff --git a/.gitignore b/.gitignore index a7a57b35..f8a492f0 100644 --- a/.gitignore +++ b/.gitignore @@ -99,7 +99,7 @@ node_modules/ npm-debug.log # Android/IJ -# +/android/ .idea .gradle local.properties diff --git a/examples/ReactExample/android/app/build.gradle b/examples/ReactExample/android/app/build.gradle index b423e8e3..51daba44 100644 --- a/examples/ReactExample/android/app/build.gradle +++ b/examples/ReactExample/android/app/build.gradle @@ -74,5 +74,5 @@ android { dependencies { compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.facebook.react:react-native:0.18.0-patched' - compile 'io.realm.react:realm-react-native:0.0.1-SNAPSHOT' + compile project(':realm') } diff --git a/examples/ReactExample/android/settings.gradle b/examples/ReactExample/android/settings.gradle index 8305bfa8..96ce9242 100644 --- a/examples/ReactExample/android/settings.gradle +++ b/examples/ReactExample/android/settings.gradle @@ -1,3 +1,6 @@ rootProject.name = 'ReactExample' include ':app' + +include ':realm' +project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android') diff --git a/package.json b/package.json index 66863451..13a6522b 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "main": "lib/index.js", "files": [ + "android", "lib", "react-native", "scripts", @@ -12,7 +13,7 @@ "RealmJS.xcodeproj" ], "scripts": { - "postinstall": "scripts/create-symlinks.sh", - "test": "scripts/test.sh" + "test": "scripts/test.sh", + "prepublish": "rm -rf android && cd react-native/android && ./gradlew publishAndroid" } } diff --git a/react-native/android/.npmignore b/react-native/android/.npmignore index d8680419..c32e72e8 100644 --- a/react-native/android/.npmignore +++ b/react-native/android/.npmignore @@ -1,4 +1,4 @@ -app/build/ +build/ .idea .gradle diff --git a/react-native/android/app/build.gradle b/react-native/android/app/build.gradle deleted file mode 100644 index c1ca8983..00000000 --- a/react-native/android/app/build.gradle +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2015-present Facebook. All Rights Reserved. - -apply plugin: 'com.android.library' -apply plugin: 'maven' - -apply plugin: 'de.undercouch.download' - -import de.undercouch.gradle.tasks.download.Download -import org.apache.tools.ant.taskdefs.condition.Os -import org.apache.tools.ant.filters.ReplaceTokens - -// We download various C++ open-source dependencies into downloads. -// We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk. -// After that we build native code from src/main/jni with module path pointing at third-party-ndk. - -def downloadsDir = new File("$buildDir/downloads") -def jscDownloadDir = new File("$projectDir/src/main/jni/jsc") -def coreDownloadDir = new File("$projectDir/src/main/jni") -ext.coreVersion = '0.95.6' -def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") - - -task createNativeDepsDirectories { - downloadsDir.mkdirs() - thirdPartyNdkDir.mkdirs() -} - -task downloadJSCHeaders(type: Download) { - def jscAPIBaseURL = 'https://svn.webkit.org/repository/webkit/!svn/bc/174650/trunk/Source/JavaScriptCore/API/' - def jscHeaderFiles = ['JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h'] - - def output = new File(jscDownloadDir, 'JavaScriptCore') - output.mkdirs() - src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" }) - onlyIfNewer true - overwrite false - dest output - } - -task downloadRealmCore(type: Download) { - src "http://static.realm.io/downloads/core/realm-core-android-${project.coreVersion}.tar.gz" - onlyIfNewer true - overwrite false - dest new File(downloadsDir, "realm-core-android-${project.coreVersion}.tar.gz") -} - -task prepareRealmCore(dependsOn: downloadRealmCore, type:Copy) { - from tarTree(downloadRealmCore.dest) - into "$coreDownloadDir/core" - //Fixing Core file naming 'arm-*' to 'armeabi-*' - doLast { - exec { - workingDir = "$coreDownloadDir/core" - commandLine = [ - "bash", - "-c", - "find . -name \"*-arm-*\" -exec sh -c \"echo {} | sed -e s/arm/armeabi/g | xargs mv {} \" \\;" - ] - } - } -} - - -def getNdkBuildName() { - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - return "ndk-build.cmd" - } else { - return "ndk-build" - } -} - -def findNdkBuildFullPath() { - // we allow to provide full path to ndk-build tool - if (hasProperty('ndk.command')) { - return property('ndk.command') - } - // or just a path to the containing directory - if (hasProperty('ndk.path')) { - def ndkDir = property('ndk.path') - return new File(ndkDir, getNdkBuildName()).getAbsolutePath() - } - if (System.getenv('ANDROID_NDK') != null) { - def ndkDir = System.getenv('ANDROID_NDK') - return new File(ndkDir, getNdkBuildName()).getAbsolutePath() - } - def ndkDir = android.hasProperty('plugin') ? android.plugin.ndkFolder : - plugins.getPlugin('com.android.library').sdkHandler.getNdkFolder() - if (ndkDir) { - return new File(ndkDir, getNdkBuildName()).getAbsolutePath() - } - return null -} - -def getNdkBuildFullPath() { - def ndkBuildFullPath = findNdkBuildFullPath() - if (ndkBuildFullPath == null) { - throw new GradleScriptException( - "ndk-build binary cannot be found, check if you've set " + - "\$ANDROID_NDK environment variable correctly or if ndk.dir is " + - "setup in local.properties", - null) - } - if (!new File(ndkBuildFullPath).canExecute()) { - throw new GradleScriptException( - "ndk-build binary " + ndkBuildFullPath + " doesn't exist or isn't executable.\n" + - "Check that the \$ANDROID_NDK environment variable, or ndk.dir in local.proerties, is set correctly.\n" + - "(On Windows, make sure you escape backslashes in local.properties or use forward slashes, e.g. C:\\\\ndk or C:/ndk rather than C:\\ndk)", - null) - } - return ndkBuildFullPath -} - -task buildReactNdkLib(dependsOn: [downloadJSCHeaders,prepareRealmCore], type: Exec) { - inputs.file('src/main/jni') - outputs.dir("$buildDir/react-ndk/all") - commandLine getNdkBuildFullPath(), - 'NDK_PROJECT_PATH=null', - "NDK_APPLICATION_MK=$projectDir/src/main/jni/Application.mk", - 'NDK_OUT=' + temporaryDir, - "NDK_LIBS_OUT=$buildDir/react-ndk/all", - "THIRD_PARTY_NDK_DIR=$buildDir/third-party-ndk", - '-C', file('src/main/jni').absolutePath, - 'NDK_LOG=1', - 'NDK_DEBUG=1', - '--jobs', Runtime.runtime.availableProcessors(), - 'V=1' -} - -task cleanReactNdkLib(type: Exec) { - commandLine getNdkBuildFullPath(), - '-C', file('src/main/jni').absolutePath, - 'clean' -} - -task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) { - from "$buildDir/react-ndk/all" - exclude '**/libjsc.so' - into "$buildDir/react-ndk/exported" -} - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" - - defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - } - - sourceSets.main { - jni.srcDirs = [] - jniLibs.srcDir "$buildDir/react-ndk/exported" - res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell'] - } - - tasks.withType(JavaCompile) { - compileTask -> compileTask.dependsOn packageReactNdkLibs - } - - clean.dependsOn cleanReactNdkLib - - lintOptions { - abortOnError false - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'org.nanohttpd:nanohttpd:2.2.0' - compile 'com.facebook.react:react-native:0.18.0-patched' -} - -apply from: 'release.gradle' diff --git a/react-native/android/app/gradle.properties b/react-native/android/app/gradle.properties deleted file mode 100644 index 76471982..00000000 --- a/react-native/android/app/gradle.properties +++ /dev/null @@ -1,14 +0,0 @@ -VERSION_NAME=0.0.1-SNAPSHOT -GROUP=io.realm.react - -POM_NAME=RealmReactAndroid -POM_ARTIFACT_ID=realm-react-native -POM_PACKAGING=aar - -android.useDeprecatedNdk=true - -MOCKITO_CORE_VERSION=1.+ -POWERMOCK_VERSION=1.6.2 -ROBOLECTRIC_VERSION=3.0 -JUNIT_VERSION=4.12 -FEST_ASSERT_CORE_VERSION=2.0M10 diff --git a/react-native/android/app/src/main/jni/src b/react-native/android/app/src/main/jni/src deleted file mode 120000 index 63fbb1dd..00000000 --- a/react-native/android/app/src/main/jni/src +++ /dev/null @@ -1 +0,0 @@ -../../../../../../src \ No newline at end of file diff --git a/react-native/android/app/src/main/jni/vendor b/react-native/android/app/src/main/jni/vendor deleted file mode 120000 index ce7b6d9c..00000000 --- a/react-native/android/app/src/main/jni/vendor +++ /dev/null @@ -1 +0,0 @@ -../../../../../../vendor \ No newline at end of file diff --git a/react-native/android/build.gradle b/react-native/android/build.gradle index 18a78f5b..4947ed1d 100644 --- a/react-native/android/build.gradle +++ b/react-native/android/build.gradle @@ -1,7 +1,4 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -apply plugin: "java" - +// Copyright 2015-present Facebook. All Rights Reserved. buildscript { repositories { jcenter() @@ -21,3 +18,211 @@ allprojects { jcenter() } } + +apply plugin: 'com.android.library' +apply plugin: 'maven' + +apply plugin: 'de.undercouch.download' + +import de.undercouch.gradle.tasks.download.Download +import org.apache.tools.ant.taskdefs.condition.Os +import org.apache.tools.ant.filters.ReplaceTokens + +// We download various C++ open-source dependencies into downloads. +// We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk. +// After that we build native code from src/main/jni with module path pointing at third-party-ndk. + +def downloadsDir = new File("$buildDir/downloads") +def jscDownloadDir = new File("$projectDir/src/main/jni/jsc") +def coreDownloadDir = new File("$projectDir/src/main/jni") +ext.coreVersion = '0.95.6' +def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") +def publishDir = new File("$projectDir/../../android/") + +task publishAndroid(dependsOn: assembleDebug, type: Copy) { + // Copy task can only have one top level + into "$publishDir" + + // copy java source + into ('/src/main') { + from "$projectDir/src/main" + exclude '**/jni/**' + } + + // add compiled shared object + into ('/src/main/jniLibs') { + from "$buildDir/intermediates/bundles/debug/jni/" + } + + // copy gradle wrapper files + FileTree gradleWrapper = fileTree(projectDir).include('gradlew*').include('gradle/**') + into ('/') { + from gradleWrapper + } + + // copy and rename template build.gradle + + into ('/') { + from "$projectDir/publish_android_template" + rename { String fileName -> + 'build.gradle' + } + } + // Use a closure to map the file name + + +} + +task createNativeDepsDirectories { + downloadsDir.mkdirs() + thirdPartyNdkDir.mkdirs() +} + +task downloadJSCHeaders(type: Download) { + def jscAPIBaseURL = 'https://svn.webkit.org/repository/webkit/!svn/bc/174650/trunk/Source/JavaScriptCore/API/' + def jscHeaderFiles = ['JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h'] + + def output = new File(jscDownloadDir, 'JavaScriptCore') + output.mkdirs() + src(jscHeaderFiles.collect { headerName -> "$jscAPIBaseURL$headerName" }) + onlyIfNewer true + overwrite false + dest output + } + +task downloadRealmCore(type: Download) { + src "http://static.realm.io/downloads/core/realm-core-android-${project.coreVersion}.tar.gz" + onlyIfNewer true + overwrite false + dest new File(downloadsDir, "realm-core-android-${project.coreVersion}.tar.gz") +} + +task prepareRealmCore(dependsOn: downloadRealmCore, type:Copy) { + from tarTree(downloadRealmCore.dest) + into "$coreDownloadDir/core" + //Fixing Core file naming 'arm-*' to 'armeabi-*' + doLast { + exec { + workingDir = "$coreDownloadDir/core" + commandLine = [ + "bash", + "-c", + "find . -name \"*-arm-*\" -exec sh -c \"echo {} | sed -e s/arm/armeabi/g | xargs mv {} \" \\;" + ] + } + } +} + + +def getNdkBuildName() { + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + return "ndk-build.cmd" + } else { + return "ndk-build" + } +} + +def findNdkBuildFullPath() { + // we allow to provide full path to ndk-build tool + if (hasProperty('ndk.command')) { + return property('ndk.command') + } + // or just a path to the containing directory + if (hasProperty('ndk.path')) { + def ndkDir = property('ndk.path') + return new File(ndkDir, getNdkBuildName()).getAbsolutePath() + } + if (System.getenv('ANDROID_NDK') != null) { + def ndkDir = System.getenv('ANDROID_NDK') + return new File(ndkDir, getNdkBuildName()).getAbsolutePath() + } + def ndkDir = android.hasProperty('plugin') ? android.plugin.ndkFolder : + plugins.getPlugin('com.android.library').sdkHandler.getNdkFolder() + if (ndkDir) { + return new File(ndkDir, getNdkBuildName()).getAbsolutePath() + } + return null +} + +def getNdkBuildFullPath() { + def ndkBuildFullPath = findNdkBuildFullPath() + if (ndkBuildFullPath == null) { + throw new GradleScriptException( + "ndk-build binary cannot be found, check if you've set " + + "\$ANDROID_NDK environment variable correctly or if ndk.dir is " + + "setup in local.properties", + null) + } + if (!new File(ndkBuildFullPath).canExecute()) { + throw new GradleScriptException( + "ndk-build binary " + ndkBuildFullPath + " doesn't exist or isn't executable.\n" + + "Check that the \$ANDROID_NDK environment variable, or ndk.dir in local.proerties, is set correctly.\n" + + "(On Windows, make sure you escape backslashes in local.properties or use forward slashes, e.g. C:\\\\ndk or C:/ndk rather than C:\\ndk)", + null) + } + return ndkBuildFullPath +} + +task buildReactNdkLib(dependsOn: [downloadJSCHeaders,prepareRealmCore], type: Exec) { + inputs.file('src/main/jni') + outputs.dir("$buildDir/react-ndk/all") + commandLine getNdkBuildFullPath(), + 'NDK_PROJECT_PATH=null', + "NDK_APPLICATION_MK=$projectDir/src/main/jni/Application.mk", + 'NDK_OUT=' + temporaryDir, + "NDK_LIBS_OUT=$buildDir/react-ndk/all", + "THIRD_PARTY_NDK_DIR=$buildDir/third-party-ndk", + '-C', file('src/main/jni').absolutePath, + 'NDK_LOG=1', + 'NDK_DEBUG=1', + '--jobs', Runtime.runtime.availableProcessors(), + 'V=1' +} + +task cleanReactNdkLib(type: Exec) { + commandLine getNdkBuildFullPath(), + '-C', file('src/main/jni').absolutePath, + 'clean' +} + +task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) { + from "$buildDir/react-ndk/all" + exclude '**/libjsc.so' + into "$buildDir/react-ndk/exported" +} + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + + sourceSets.main { + jni.srcDirs = [] + jniLibs.srcDir "$buildDir/react-ndk/exported" + res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell'] + } + + tasks.withType(JavaCompile) { + compileTask -> compileTask.dependsOn packageReactNdkLibs + } + + clean.dependsOn cleanReactNdkLib + + lintOptions { + abortOnError false + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'org.nanohttpd:nanohttpd:2.2.0' + compile 'com.facebook.react:react-native:0.18.0-patched' +} + +apply from: 'release.gradle' diff --git a/react-native/android/gradle.properties b/react-native/android/gradle.properties index 2f4d15ce..76471982 100644 --- a/react-native/android/gradle.properties +++ b/react-native/android/gradle.properties @@ -1,22 +1,14 @@ -# Project-wide Gradle settings. +VERSION_NAME=0.0.1-SNAPSHOT +GROUP=io.realm.react -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +POM_NAME=RealmReactAndroid +POM_ARTIFACT_ID=realm-react-native +POM_PACKAGING=aar android.useDeprecatedNdk=true -org.gradle.daemon=true +MOCKITO_CORE_VERSION=1.+ +POWERMOCK_VERSION=1.6.2 +ROBOLECTRIC_VERSION=3.0 +JUNIT_VERSION=4.12 +FEST_ASSERT_CORE_VERSION=2.0M10 diff --git a/react-native/android/gradle/wrapper/gradle-wrapper.properties b/react-native/android/gradle/wrapper/gradle-wrapper.properties index b9fbfaba..94dc7030 100644 --- a/react-native/android/gradle/wrapper/gradle-wrapper.properties +++ b/react-native/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Wed Feb 10 01:35:36 GMT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip diff --git a/react-native/android/app/proguard-rules.pro b/react-native/android/proguard-rules.pro similarity index 100% rename from react-native/android/app/proguard-rules.pro rename to react-native/android/proguard-rules.pro diff --git a/react-native/android/publish_android_template b/react-native/android/publish_android_template new file mode 100644 index 00000000..fd855c05 --- /dev/null +++ b/react-native/android/publish_android_template @@ -0,0 +1,33 @@ +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + } +} + +apply plugin: 'com.android.library' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 22 + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'org.nanohttpd:nanohttpd:2.2.0' + compile 'com.facebook.react:react-native:0.18.0-patched' +} diff --git a/react-native/android/app/release.gradle b/react-native/android/release.gradle similarity index 100% rename from react-native/android/app/release.gradle rename to react-native/android/release.gradle diff --git a/react-native/android/settings.gradle b/react-native/android/settings.gradle deleted file mode 100644 index 321dcf8a..00000000 --- a/react-native/android/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = 'RealmReactNative' - -include ':app' -include ':react-native' diff --git a/react-native/android/app/src/main/AndroidManifest.xml b/react-native/android/src/main/AndroidManifest.xml similarity index 100% rename from react-native/android/app/src/main/AndroidManifest.xml rename to react-native/android/src/main/AndroidManifest.xml diff --git a/react-native/android/app/src/main/java/io/realm/react/RealmReactAndroid.java b/react-native/android/src/main/java/io/realm/react/RealmReactAndroid.java similarity index 100% rename from react-native/android/app/src/main/java/io/realm/react/RealmReactAndroid.java rename to react-native/android/src/main/java/io/realm/react/RealmReactAndroid.java diff --git a/react-native/android/app/src/main/jni/.npmignore b/react-native/android/src/main/jni/.npmignore similarity index 100% rename from react-native/android/app/src/main/jni/.npmignore rename to react-native/android/src/main/jni/.npmignore diff --git a/react-native/android/app/src/main/jni/Android.mk b/react-native/android/src/main/jni/Android.mk similarity index 100% rename from react-native/android/app/src/main/jni/Android.mk rename to react-native/android/src/main/jni/Android.mk diff --git a/react-native/android/app/src/main/jni/Application.mk b/react-native/android/src/main/jni/Application.mk similarity index 100% rename from react-native/android/app/src/main/jni/Application.mk rename to react-native/android/src/main/jni/Application.mk diff --git a/react-native/android/app/src/main/jni/jsc/.gitignore b/react-native/android/src/main/jni/jsc/.gitignore similarity index 100% rename from react-native/android/app/src/main/jni/jsc/.gitignore rename to react-native/android/src/main/jni/jsc/.gitignore diff --git a/react-native/android/src/main/jni/src b/react-native/android/src/main/jni/src new file mode 120000 index 00000000..ae9260b3 --- /dev/null +++ b/react-native/android/src/main/jni/src @@ -0,0 +1 @@ +../../../../../src/ \ No newline at end of file diff --git a/react-native/android/src/main/jni/vendor b/react-native/android/src/main/jni/vendor new file mode 120000 index 00000000..776800d2 --- /dev/null +++ b/react-native/android/src/main/jni/vendor @@ -0,0 +1 @@ +../../../../../vendor \ No newline at end of file diff --git a/scripts/.test.sh.swo b/scripts/.test.sh.swo deleted file mode 100644 index 2c0557be85a05cd4dad86886d2a0df5a792b7656..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2TWl0n9L7(%iy$H|goyq-R9cjofnro>YFtX&ER@!?3)N7pvomLRhtAEJ*`-j5 zmj@q=;DZojV$`6~C~BflCK}$1F&bk`j7CX(FcA~4L89To%XemGx7$)|6%sX>&Hnc6 zo;l}#&V1)G-?Wq8usgexZdGn(cwNod;4>$7uR7PydX_aX%{N8vjIWGu2J%i#-|D&} za>n!(%hfgO!fJ;RPz`)t^|@x*@u$2mPy^jJy)aNi9)wCzy0BuJlPZuZaA^vZ!-9O< zQnsme;|39EjnqghuGw{IG1J3CsoWUB%eb;0Yjs>%nzkHCO?DUCP)m z;57Igya`T#-Czgk0?WZ-z`*$>jC}?^0PlcP;BD|0I02pokAN}=fDa6ygFC<{S2Fer zcnll`cLN2i11;do#f&`(j)8-~1bHwF&R)UTyWk~o4_FCSfb)wO`v#l=XfF7_Fw1L%NIamzlfClgp{;2dmco94go&(3hG4MFJ=xfBZtYJ^n zN38JbR!3a(G$F_l1( za5QO=D32#vMvxJfxP!zjP|-&O`96}mvOS$N*q_biI(r)%C2H#F>+Z2o3T2;h0a?dy-zK?GUkZ5>EwoEL~fH%@xh_P#zlWA=#jr3)9}VSUA-3%0UUED-;&b2kD_KzRMz{IO=)^5=AZgnql$% z)&6O|UNS2@s0E0tI_O`8tI2s{enfqen&K%VQ9DT!Z3I<4q*{M!4UX!r!SiL)GDr^e z61O?^i_Ue9YPN@=lXcfAn8mUm2|`j+M_+GOwtH89CYSB&l~BnTA=4{io&}~|wzLq_ zD2~^(t#crk?TreGQ=E1f${waNr~0!((PTu*&OtMpYKo%b9j}ab2R$CPU85}KdsH!6 zZRyHNS5~^R#8oBU;4aI`8s_mnFkHXr6s$@#5^sYAnqhHXG(`Po6zz>kTY*}?1O3I` zmXxpG)u!LhEIW$$&o;CAZ7kW@#KsK)@J_bvzrVE+&31DejxHIOG62&DsL7Ah_}8z1 zGhD!CGsN2mF6;OboA#1w+53Wt-mobbopCWGL>`ItLWf{<{IYOviI=%E)3GDd-Ps>m zq%l?~JG$^0G$~BWI`~l35#B8tn^{@6s;8Wtd+Qp7e~TAIwW7EN8wV8FxJkXd(8$4K zDQf+Gkl2~TlT_oW)h}>iRmWE!Ir4nd=|WUrtX-ym_7Q*2%zDr;5Cp25Q!+ z^>!6asE%;?6Vr!i4RyFauaz6%zUT)+@xW;giI18g%r*>cz@3l=vfa7P{+(#6+DNS? zUAzUuEEKpe>fa??Ayv2^K#C~J8rmVIH5{`rw4|5)s34?CJfG*g&?SI0S|ExXAX_^? zc}@j5XVO@FC*W0Y9%}t*6E_M|mRjRX_LT*=Ly~!%xa650FJKJt>~Eu*Hyt&v;aU4X E0b!HH4gdfE diff --git a/scripts/create-symlinks.sh b/scripts/create-symlinks.sh deleted file mode 100755 index 3bad586f..00000000 --- a/scripts/create-symlinks.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e -set -o pipefail - -symlink() { - [ -e "$(basename "$1")" ] || ln -s "$1" -} - -cd "$(dirname "$0")/.." - -# A top-level "android" directory is expected by `react-native link` -symlink react-native/android - -# NPM doesn't support publishing symlinks, so these must be re-created -cd react-native/android/app/src/main/jni -symlink ../../../../../../src -symlink ../../../../../../vendor diff --git a/tests/react-test-app/android/app/gradlew b/tests/react-test-app/android/app/gradlew old mode 100644 new mode 100755