Hello guys I am just checking the Gradle 8.2 relea...
# gradle
m
Hello guys I am just checking the Gradle 8.2 release notes and was wondering with the Gradle 8.2, do
Copy code
org.gradle.kotlin.dsl.allWarningsAsErrors=true
does the same thing as
Copy code
allprojects {
    tasks.withType<KotlinCompile> {
        kotlinOptions {
            allWarningsAsErrors = true
        }
    }
}
?
t
yes
but only for build scripts
m
Ohh I see, so we still need the second one for the entire project, thanks a lot!
v
@tapchicoma but it is only for the actual build scripts of the project, not for precompiled script plugins right? So in a project that builds build logic, you would need the property for the build scripts that build that project plus the configuration for the built precompiled script plugins, right? Or would it also be used for the precompiled script plugins. PS:
allprojects { ... }
is evil. 😉
t
right, for precompiled script plugins you need to configure project with them using
kotlin.compilerOptions.allWarnings.allWarningsAsErrors.set(true)
introduced property only affects
.gradle.kts
build scripts
v
precompiled script plugins are
.gradle.kts
, hence my question 🙂
t
you are right 😅 They are located in some project sources and they are compiled as a part of "normal" compilation process and could use already existing approach for warnings
v
Yeah, just wanted to make sure. The
kotlin-dsl.precompiled-script-plugins
plugin could have been changed to forward this property also to this compilation. While the would then of course also hit all other Kotlin files in that project if there are any, so would probably have been bad. 🙂 Yep, just wanted to make sure. The