fix kotlinx-coroutines/kotlinx-serialization dependencies version clash in gradle-plugins

This commit is contained in:
Adam 2022-10-08 17:06:04 +02:00
parent f4b614a56a
commit 467227d965
4 changed files with 27 additions and 4 deletions

View file

@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("kafkatorio.conventions.kotlin-dsl")
kotlin("plugin.serialization") version embeddedKotlinVersion
id("kafkatorio.conventions.kotlin-serialization")
}
@ -61,7 +61,7 @@ gradlePlugin {
}
overrideKotlinLanguageVersion("1.6")
overrideKotlinLanguageVersion("1.7")
//val gradleKotlinTarget = "1.7"
//
@ -73,3 +73,13 @@ overrideKotlinLanguageVersion("1.6")
// }
// }
//}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.ExperimentalStdlibApi",
"-opt-in=kotlin.time.ExperimentalTime",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
)
}

View file

@ -14,8 +14,12 @@ dependencies {
// get polluted and messy.
implementation("org.gradle.kotlin:gradle-kotlin-dsl-plugins:$expectedKotlinDslPluginsVersion")
// implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${embeddedKotlinVersion}")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
implementation(platform(libs.kotlin.bom))
implementation("org.jetbrains.kotlin:kotlin-serialization")
implementation(platform(libs.kotlinx.coroutines.bom))
}
kotlin {

View file

@ -0,0 +1,8 @@
package kafkatorio.conventions
plugins {
kotlin("plugin.serialization")
}
// No config required or available. This convention plugin is only required because Gradle gets
// confused about the version.