https://kotlinlang.org logo
Title
t

Tomas Pekarek

05/19/2020, 7:34 AM
This is taken from build.gradle.kts
tasks{   
 "bootJar"(BootJar::class) {
        archiveFileName.set("imps.jar")
    }}
I was wondering what kind of language construct allows me to write string followed by (). I mean "bootJar"(BootJar::class). What is that? -- I found that string boot initializer uses
withType<Test> {
        useJUnitPlatform()
    }
What is the preferred way to modify tasks?
o

octylFractal

05/19/2020, 7:36 AM
String.invoke()
is declared on
DependencyHandlerScope
intellij will jump to it if you go to definition
n

no

05/19/2020, 7:36 AM
Here is some documentation regarding configuring tasks: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
o

octylFractal

05/19/2020, 7:36 AM
err, that's for tasks, so TaskScope or something
t

Tomas Pekarek

05/19/2020, 7:50 AM
Ok, so its invoke operator overload. Thank u both.