Slackbot
09/20/2022, 2:49 PMPaul Merlin
09/20/2022, 3:03 PMkotlin
of type KotlinJvmProjectExtension
Hrafn Thorvaldsson
09/20/2022, 3:11 PMKotlinJvmOptions
configuration? I am attempting to move the code below from a build script configuration, via task lookup, into a conventional plugin. I can't easily see how I might be able to do this via the KotlinJvmProjectExtension
tasks.withType(KotlinCompile::class).configureEach {
kotlinOptions {
allWarningsAsErrors = true
jvmTarget = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
freeCompilerArgs = freeCompilerArgs + "-Xexplicit-api=strict" + "-opt-in=kotlin.RequiresOptIn"
}
}
Paul Merlin
09/20/2022, 3:13 PMPaul Merlin
09/20/2022, 3:13 PMkotlin.target.compilations["main"]
will get you the compilation options for the main source set.Paul Merlin
09/20/2022, 3:14 PMkotlin.target.compilations.configureEach {}
should work if you want to configure them allHrafn Thorvaldsson
09/20/2022, 3:20 PMJean Helou
09/21/2022, 7:19 AMHrafn Thorvaldsson
09/21/2022, 11:36 AMincludeBuild
, but may start releasing them to a private artifact repository later onJean Helou
09/21/2022, 11:52 AM