diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 25ba9d2c1b2..fa1be07afa7 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -13,7 +13,8 @@ import org.apache.tools.ant.filters.ReplaceTokens // 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 customDownloadsDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR") +def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File("$buildDir/downloads") def thirdPartyNdkDir = new File("$buildDir/third-party-ndk") // You need to have following folders in this directory: @@ -145,6 +146,16 @@ task prepareJSC(dependsOn: dependenciesPath ? [] : [downloadJSCHeaders]) << { } } +task downloadNdkBuildDependencies { + if (!boostPath) { + dependsOn downloadBoost + } + dependsOn downloadDoubleConversion + dependsOn downloadFolly + dependsOn downloadGlog + dependsOn downloadJSCHeaders +} + def getNdkBuildName() { if (Os.isFamily(Os.FAMILY_WINDOWS)) { return "ndk-build.cmd"