I have a list of legacy plugins I am working with ...
# community-support
m
I have a list of legacy plugins I am working with at the moment, some of these have code like this
Copy code
project.rootProject.subprojects {
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java) {
        compilerOptions {
            freeCompilerArgs.add("-Xsam-conversions=class")
        }
    }
}
From what I could look up it seems this behaviour should be now enabled by default but Gradle documentation still mentions this https://docs.gradle.org/current/userguide/kotlin_dsl.html#sec:kotlin_compiler_arguments What am I missing?
v
The documentation you linked to says, that this option is enabled by default for compiling Kotlin DSL build scripts and if you use the
kotlin-dsl
plugin, not for all Kotlin tasks. Besides that this kind of cross-project configuration of course is highly discouraged bad practice.
🙌🏻 1
m
That's exactly why I am asking, I am trying to get rid of all cross-project configuration we have in our gradle build and it's challenging the behaviour will be the same
👌 1