mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
External dependencies: throw exception if jdk ouput directory cannot be deleted
This commit is contained in:
@@ -56,7 +56,11 @@ task setupJdk18(dependsOn: downloadJdk18) {
|
||||
|
||||
def unpackJdk(jdkArchive, outputDir) {
|
||||
logger.info("Unpacking $jdkArchive to ${outputDir}")
|
||||
file(outputDir).deleteDir()
|
||||
if (file(outputDir).exists()) {
|
||||
if (!file(outputDir).deleteDir()) {
|
||||
throw new Exception("unpackJdk: Unable to delete folder: $outputDir")
|
||||
}
|
||||
}
|
||||
def currentOs = org.gradle.internal.os.OperatingSystem.current()
|
||||
if (currentOs.isWindows()) {
|
||||
copy {
|
||||
|
||||
Reference in New Issue
Block a user