fix(build): switch kotlin-library plugin to compilerOptions DSL

This commit is contained in:
Harsh Shandilya 2023-04-23 14:54:24 +05:30
parent 57670ea047
commit 9348b7c444
No known key found for this signature in database

View file

@ -16,10 +16,10 @@ class KotlinLibraryPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.pluginManager.apply(KotlinCommonPlugin::class)
project.tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
if (!name.contains("test", ignoreCase = true)) {
freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict")
project.tasks.withType<KotlinCompile>().configureEach task@{
compilerOptions {
if (!this@task.name.contains("test", ignoreCase = true)) {
freeCompilerArgs.add("-Xexplicit-api=strict")
}
}
}