diff --git a/react-native/android/app/build.gradle b/react-native/android/app/build.gradle index adca085b..76c48704 100644 --- a/react-native/android/app/build.gradle +++ b/react-native/android/app/build.gradle @@ -14,6 +14,7 @@ import org.apache.tools.ant.filters.ReplaceTokens // 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 thirdPartyNdkDir = new File("$buildDir/third-party-ndk") task createNativeDepsDirectories { @@ -21,6 +22,18 @@ task createNativeDepsDirectories { 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-0.94.4.tar.gz' onlyIfNewer true @@ -83,7 +96,7 @@ def getNdkBuildFullPath() { return ndkBuildFullPath } -task buildReactNdkLib(type: Exec) { +task buildReactNdkLib(dependsOn: downloadJSCHeaders, type: Exec) { inputs.file('src/main/jni') outputs.dir("$buildDir/react-ndk/all") commandLine getNdkBuildFullPath(), diff --git a/vendor/PEGTL b/vendor/PEGTL index 3c4128a7..2c835cb5 160000 --- a/vendor/PEGTL +++ b/vendor/PEGTL @@ -1 +1 @@ -Subproject commit 3c4128a7e7e1288eb746418ea60c41477358f26a +Subproject commit 2c835cb58073351e373e260f45ac2e148ef3b718