From 4a3c193ce03ac458d73c0eb017fa5522ae24aff9 Mon Sep 17 00:00:00 2001 From: "Dmitriy.Panov" Date: Thu, 4 Oct 2018 11:01:49 +0300 Subject: [PATCH] IJI-30: intellij.build.bundled.jre.prefix system property removed --- build/dependencies/setupJbre.gradle | 15 ++++++++++++--- .../jetbrains/intellij/build/BuildOptions.groovy | 5 ----- .../intellij/build/impl/BuildTasksImpl.groovy | 3 +-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/build/dependencies/setupJbre.gradle b/build/dependencies/setupJbre.gradle index de4e5b8a2b64..a70fd5f84005 100644 --- a/build/dependencies/setupJbre.gradle +++ b/build/dependencies/setupJbre.gradle @@ -1,11 +1,20 @@ -task setupJbre {} +def setupJbre = task setupJbre {} def jdkRepo = 'https://cache-redirector.jetbrains.com/intellij-jdk' def targetOs = System.getProperty("intellij.build.target.os", "all") def bundledJreVersion = System.getProperty("intellij.build.bundled.jre.version", "8").toInteger() def isBundledJreModular = bundledJreVersion >= 9 -def jreArtifactPrefix = System.getProperty("intellij.build.bundled.jre.prefix", "jbrex8") def jreArtifactBuild = System.getProperty("intellij.build.bundled.jre.build", jdkBuild) +def jreArtifactPrefix +if (bundledJreVersion == 8) { + jreArtifactPrefix = 'jbrex8' +} +else if (bundledJreVersion == 9) { + jreArtifactPrefix = 'jbsdk9' +} +else { + throw new IllegalArgumentException("Unable to determine bundled JRE artifact prefix by JRE version $bundledJreVersion") +} jrePlatformsToDownload(targetOs).each { platform -> archToDownload(platform, !isBundledJreModular).each { arch -> @@ -136,7 +145,7 @@ def createTarJbreTask(String taskName, } } arguments += [dirToTar] - commandLine arguments + commandLine = arguments } } } diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy index b20747bfa12f..ee294f180d07 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy @@ -122,9 +122,4 @@ class BuildOptions { * Specifies JRE build to be bundled with distributions. If {@code null} then jdkBuild from gradle.properties will be used. */ String bundledJreBuild = System.getProperty("intellij.build.bundled.jre.build") - - /** - * Specifies prefix of JRE artifact to be bundled with distributions, JB JRE 8 prefix by default. - */ - String bundledJrePrefix = System.getProperty("intellij.build.bundled.jre.prefix", "jbrex8") } \ No newline at end of file diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildTasksImpl.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildTasksImpl.groovy index 07b22c9bcd9f..7b3486bab091 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildTasksImpl.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildTasksImpl.groovy @@ -356,8 +356,7 @@ idea.fatal.error.notification=disabled logFreeDiskSpace("before downloading JREs") String[] args = [ 'setupJbre', "-Dintellij.build.target.os=$buildContext.options.targetOS", - "-Dintellij.build.bundled.jre.version=$buildContext.options.bundledJreVersion", - "-Dintellij.build.bundled.jre.prefix=$buildContext.options.bundledJrePrefix" + "-Dintellij.build.bundled.jre.version=$buildContext.options.bundledJreVersion" ] if (buildContext.options.bundledJreBuild != null) { args += "-Dintellij.build.bundled.jre.build=$buildContext.options.bundledJreBuild"