2022-10-02 12:11:06 +02:00
|
|
|
import org.gradle.kotlin.dsl.support.expectedKotlinDslPluginsVersion
|
2022-09-12 21:38:01 +02:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
`kotlin-dsl`
|
|
|
|
|
kotlin("jvm") version embeddedKotlinVersion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val gradleJvmTarget = "11"
|
|
|
|
|
|
2022-09-18 13:56:02 +02:00
|
|
|
dependencies {
|
|
|
|
|
// This project should only be providing simple plugins for configuring Gradle without
|
|
|
|
|
// dependencies. Try to avoid setting dependencies here, else the Gradle script classpath might
|
|
|
|
|
// get polluted and messy.
|
2022-10-02 12:11:06 +02:00
|
|
|
|
|
|
|
|
implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion")
|
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
|
2022-10-08 17:06:04 +02:00
|
|
|
|
|
|
|
|
implementation(platform(libs.kotlin.bom))
|
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-serialization")
|
|
|
|
|
|
|
|
|
|
implementation(platform(libs.kotlinx.coroutines.bom))
|
2022-09-18 13:56:02 +02:00
|
|
|
}
|
|
|
|
|
|
2022-09-12 21:38:01 +02:00
|
|
|
kotlin {
|
|
|
|
|
jvmToolchain {
|
|
|
|
|
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(gradleJvmTarget))
|
|
|
|
|
}
|
2022-09-18 13:56:02 +02:00
|
|
|
}
|
2022-09-12 21:38:01 +02:00
|
|
|
|
2022-09-18 13:56:02 +02:00
|
|
|
kotlinDslPluginOptions {
|
|
|
|
|
jvmTarget.set(gradleJvmTarget)
|
2022-09-12 21:38:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile>().configureEach {
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = gradleJvmTarget
|
|
|
|
|
}
|
|
|
|
|
}
|