Caleb Cushing
09/12/2024, 2:49 PMtasks.compileJava {
options.release = 17
options.compilerArgs.addAll(
listOf(
"-AaddSuppressWarningsAnnotation=true",
"-AaddGeneratedAnnotation=true",
),
)
}Vampire
09/12/2024, 3:21 PMCaleb Cushing
09/12/2024, 3:22 PMVampire
09/12/2024, 3:26 PMtasks.compileJava directly gives you the task.
But as there is a trailing comma and a listOf, this is Kotlin DSL.
In Kotlin DSL tasks.compileJava gives you a TaskProvider.
And TaskProvider.invoke (which is what you use there implicitly) is syntactic sugar for TaskProvider.configure which is the lazy variant of configureEach for one provider.Vampire
09/12/2024, 3:27 PMtasks.compileJava.configure { ... }, but it really is the same effectively