I am trying to set `allWarningsAsErrors = true` fo...
# announcements
s
I am trying to set
allWarningsAsErrors = true
for all my modules regardless of them being, common, multiplatform-js, multiplatform-jvm, kotlinjs, kotlin ect. Is this the right type to search for ?
Copy code
subprojects {
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.class) {
        kotlinOptions {
            allWarningsAsErrors = true
        }
    }
}
e
https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
Instead of:
DomainObjectCollection.withType(java.lang.Class, org.gradle.api.Action)
Use:
withType(java.lang.Class).configureEach(org.gradle.api.Action)
👍 1