Add settings convention for JVM toolchain provider
This commit is contained in:
committed by
Space Team
parent
30d218827a
commit
7819e2bf54
@@ -18,6 +18,7 @@ pluginManagement {
|
||||
plugins {
|
||||
id "build-cache"
|
||||
id "gradle-enterprise"
|
||||
id "jvm-toolchain-provisioning"
|
||||
}
|
||||
|
||||
File versionPropertiesFile = new File(rootProject.projectDir.parentFile, "gradle/versions.properties")
|
||||
|
||||
@@ -5,4 +5,5 @@ Provides common settings convention plugins for the repo.
|
||||
### List of plugins
|
||||
|
||||
- "build-cache" - local and remote build cache configuration
|
||||
- "gradle-enterprise" - configures build scans upload
|
||||
- "gradle-enterprise" - configures build scans upload
|
||||
- "jvm-toolchain-provisioning" - configures JVM toolchain to download project JDKs via Disco API
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
id("org.jetbrains.kotlin.jvm")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.gradle.toolchains:foojay-resolver:0.4.0")
|
||||
}
|
||||
|
||||
kotlin.jvmToolchain(8)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver")
|
||||
}
|
||||
|
||||
toolchainManagement {
|
||||
jvm {
|
||||
javaRepositories {
|
||||
repository("foojay") {
|
||||
resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,19 +10,19 @@ pluginManagement {
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies")
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
val buildGradlePluginVersion = extra.get("kotlin.build.gradlePlugin.version")
|
||||
dependencies {
|
||||
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:$buildGradlePluginVersion")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
|
||||
}
|
||||
|
||||
include(":build-cache")
|
||||
include(":gradle-enterprise")
|
||||
include(":jvm-toolchain-provisioning")
|
||||
|
||||
// Unfortunately it is not possible to apply build-cache.settings.gradle.kts as script compilation
|
||||
// could not then find types from "kotlin-build-gradle-plugin"
|
||||
|
||||
+1
-1
@@ -16,9 +16,9 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.gradle.toolchains.foojay-resolver-convention" version "0.4.0"
|
||||
id "build-cache"
|
||||
id "gradle-enterprise"
|
||||
id "jvm-toolchain-provisioning"
|
||||
}
|
||||
|
||||
def buildProperties = BuildPropertiesKt.getKotlinBuildPropertiesForSettings(settings)
|
||||
|
||||
Reference in New Issue
Block a user