mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
installing offline repo
This commit is contained in:
@@ -20,15 +20,19 @@ task setupAndroidSdk {
|
||||
|
||||
def zipFile = org.gradle.internal.os.OperatingSystem.current().familyName + ".zip"
|
||||
def gradleFile = "gradle-3.3-bin.zip"
|
||||
def repoFile = "offline_repo_repo.zip"
|
||||
def archivePath = "$project.buildDir/android-sdk/" + zipFile
|
||||
def gradlePath = "$project.buildDir/android-sdk/" + gradleFile
|
||||
def repoPath = "$project.buildDir/android-sdk/" + repoFile
|
||||
def outputDir ="$project.buildDir/android-sdk/prebuilts/studio/sdk"
|
||||
def outputGradle ="$project.buildDir/android-sdk/tools/external/gradle"
|
||||
def outputRepo ="$project.buildDir/android-sdk/prebuilts/tools/common/m2/repository"
|
||||
outputs.dir(outputDir)
|
||||
outputs.dir(outputGradle)
|
||||
outputs.dir("$project.buildDir/android-sdk/prebuilts/tools/common");
|
||||
outputs.file(archivePath)
|
||||
outputs.file(gradlePath)
|
||||
outputs.file(repoPath)
|
||||
|
||||
doFirst {
|
||||
download {
|
||||
@@ -41,6 +45,11 @@ task setupAndroidSdk {
|
||||
dest gradlePath
|
||||
onlyIfNewer true
|
||||
}
|
||||
download {
|
||||
src "http://repo.labs.intellij.net/thirdparty/android-sdk/" + repoFile
|
||||
dest repoPath
|
||||
onlyIfNewer true
|
||||
}
|
||||
}
|
||||
doLast {
|
||||
logger.info("Unpacking android sdk into " + archivePath)
|
||||
@@ -52,7 +61,10 @@ task setupAndroidSdk {
|
||||
from file(gradlePath)
|
||||
into outputGradle
|
||||
}
|
||||
file("$project.buildDir/android-sdk/prebuilts/tools/common/m2/repository").mkdirs()
|
||||
copy {
|
||||
from zipTree(file(repoPath))
|
||||
into outputRepo
|
||||
}
|
||||
file("$project.buildDir/android-sdk/prebuilts/tools/common/offline-m2").mkdirs()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user