OSS: add gradle wrapper helper to prepare offline gradle caches

Summary:
This is to help build offline module caches for gradle builds.

allow-large-files

Reviewed By: hramos

Differential Revision: D7441450

fbshipit-source-id: 37ceb070223f0de06720f5c104ecfce2ad6cedfd
This commit is contained in:
Kevin Gozali 2018-03-29 20:59:47 -07:00 коммит произвёл Facebook Github Bot
Родитель ee0c69dfa6
Коммит 1020ac9481
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -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"