Skip to content

Commit

Permalink
Update TeamCity configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
asodja committed Oct 25, 2024
1 parent 2fd2324 commit c9339e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .teamcity/settings/GradleProfilerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ open class GradleProfilerTest(os: Os, javaVersion: JavaVersion, arch: Arch = Arc
gradleProfilerVcs()

params {
// Java home must always use Java11
// since intellij-gradle-plugin is not compatible with Java8
javaHome(os, JavaVersion.OPENJDK_11)
// Java home must always use Java17
// since intellij-gradle-plugin requires Java17+
javaHome(os, JavaVersion.OPENJDK_17)
androidHome(os)
}

Expand Down
6 changes: 5 additions & 1 deletion .teamcity/settings/extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ fun BuildType.agentRequirement(os: Os, arch: Arch = Arch.AMD64) {
fun toolchainConfiguration(os: Os) = listOf(
"-Porg.gradle.java.installations.auto-detect=false",
"-Porg.gradle.java.installations.auto-download=false",
""""-Porg.gradle.java.installations.paths=%${os.name}.java8.oracle.64bit%,%${os.name}.java11.openjdk.64bit%""""
""""-Porg.gradle.java.installations.paths=
|%${os.name}.java8.oracle.64bit%,
|%${os.name}.java11.openjdk.64bit%,
|%${os.name}.java17.openjdk.64bit%"""".trimMargin()
).joinToString(" ")

fun ParametrizedWithType.javaHome(os: Os, javaVersion: JavaVersion) {
Expand All @@ -36,6 +39,7 @@ fun ParametrizedWithType.androidHome(os: Os) {
enum class JavaVersion(val majorVersion: String, val vendor: String, private val javaHomePostfix: String) {
ORACLE_JAVA_8("8", "oracle", "java8.oracle.64bit"),
OPENJDK_11("11", "openjdk", "java11.openjdk.64bit");
OPENJDK_17("17", "openjdk", "java17.openjdk.64bit");

fun javaHome(os: Os) = "%${os.name}.$javaHomePostfix%"
}
Expand Down

0 comments on commit c9339e7

Please sign in to comment.