Skip to content

Commit c53717f

Browse files
fzhinkinSpace Team
authored andcommitted
[ABI Validation] Use foojay-resolver-convention to resolve JVM toolchains
* Use foojay-resolver-convention to resolve JVM toolchains * Remove no longer needed java toolchain setup Pull request Kotlin/binary-compatibility-validator#238 Moved from Kotlin/binary-compatibility-validator@33a495b
1 parent 2efbc48 commit c53717f

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

libraries/tools/abi-validation/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import kotlinx.validation.build.mavenRepositoryPublishing
44
import kotlinx.validation.build.signPublicationIfKeyPresent
55
import org.gradle.api.attributes.TestSuiteType.FUNCTIONAL_TEST
66
import org.jetbrains.dokka.gradle.DokkaTask
7-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
87
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
98
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
109
import java.net.URL
@@ -101,9 +100,10 @@ tasks.compileKotlin {
101100
java {
102101
withJavadocJar()
103102
withSourcesJar()
104-
toolchain {
105-
languageVersion.set(JavaLanguageVersion.of(8))
106-
}
103+
}
104+
105+
kotlin {
106+
jvmToolchain(8)
107107
}
108108

109109
tasks.compileTestKotlin {

libraries/tools/abi-validation/buildSrc/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
/*
2-
* Copyright 2016-2020 JetBrains s.r.o.
2+
* Copyright 2016-2024 JetBrains s.r.o.
33
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
44
*/
55

6-
import java.util.Properties
76
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
87

98
plugins {
109
`kotlin-dsl`
1110
}
1211

12+
kotlin {
13+
jvmToolchain(8)
14+
}
15+
1316
dependencies {
1417
implementation(libs.gradlePlugin.kotlin)
1518
implementation(libs.gradlePlugin.pluginPublishing)

libraries/tools/abi-validation/buildSrc/settings.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ pluginManagement {
1313
}
1414
}
1515

16+
plugins {
17+
id("org.gradle.toolchains.foojay-resolver-convention")
18+
}
19+
1620
@Suppress("UnstableApiUsage")
1721
dependencyResolutionManagement {
1822

libraries/tools/abi-validation/buildSrc/src/main/kotlin/conventions/java-base.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ plugins {
1010
}
1111

1212
java {
13-
toolchain {
14-
languageVersion.set(JavaLanguageVersion.of(8))
15-
}
1613
withSourcesJar()
1714
withJavadocJar()
1815
}

libraries/tools/abi-validation/settings.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2023 JetBrains s.r.o.
2+
* Copyright 2016-2024 JetBrains s.r.o.
33
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
44
*/
55
import org.gradle.api.initialization.resolve.RepositoriesMode.PREFER_SETTINGS
@@ -14,6 +14,10 @@ pluginManagement {
1414
}
1515
}
1616

17+
plugins {
18+
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.8.0")
19+
}
20+
1721
@Suppress("UnstableApiUsage")
1822
dependencyResolutionManagement {
1923

0 commit comments

Comments
 (0)