Simplify JDK copy specification in archives build

This commit simplifies the JDK copy specification in the archives build
so that it's a single line as opposed to an if/else with a repeated
body. This approach reduces the maintenance cost of this code.
This commit is contained in:
Jason Tedor 2019-10-31 15:18:11 -04:00
parent b1c5025498
commit 90d4437513
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 2 additions and 8 deletions

View File

@ -61,14 +61,8 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
with binFiles(distributionType, oss, jdk)
}
if (jdk) {
if ("darwin".equals(platform)) {
into('jdk.app') {
with jdkFiles(project, platform)
}
} else {
into('jdk') {
with jdkFiles(project, platform)
}
into("darwin".equals(platform) ? 'jdk.app' : 'jdk')
with jdkFiles(project, platform)
}
}
into('') {