Dependencies: use Gradle file operations to remove outdated JDK

it throws an exception in case of any problems
This commit is contained in:
Alexander Zolotov
2018-02-27 22:46:55 +03:00
parent 122ac18dc3
commit 39218f007e
+1 -3
View File
@@ -43,9 +43,7 @@ task setupJdk18(dependsOn: downloadJdk18) {
def unpackJdk(jdkArchive, outputDir) {
logger.info("Unpacking $jdkArchive to ${outputDir}")
if (file(outputDir).exists()) {
if (!file(outputDir).deleteDir()) {
throw new Exception("unpackJdk: Unable to delete folder: $outputDir")
}
delete(outputDir)
}
def currentOs = org.gradle.internal.os.OperatingSystem.current()
if (currentOs.isWindows()) {