From 90d44375136e0b66608be59949ab2bad4710111a Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 31 Oct 2019 15:18:11 -0400 Subject: [PATCH] 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. --- distribution/archives/build.gradle | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/distribution/archives/build.gradle b/distribution/archives/build.gradle index c3ca84a53f2..6bdab3dcab0 100644 --- a/distribution/archives/build.gradle +++ b/distribution/archives/build.gradle @@ -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('') {