Slackbot
11/30/2023, 8:46 PMephemient
11/30/2023, 11:34 PMVampire
12/01/2023, 1:42 AMStefan Schallerl
12/01/2023, 8:44 AMtasks.getByName<MyPluginTask("secondConfig") { ...
...Stefan Schallerl
12/01/2023, 9:24 AMVampire
12/01/2023, 9:44 AMsourceSet, the Java plugin automatically registers and wires compilation tasks for it. Or when you create or register a new test suite, the jvm test suite plugin registers new test tasks for it, and so on.Stefan Schallerl
12/01/2023, 10:21 AMtasks.getByName<MyPluginTask>("myplugin") {
addConfig("foo") {
inputDirectory = "$projectDir/src/main/xyz"
outputDirectory = "$buildDir/generated-sources/myplugin-xyz"
}
addConfig("bar") {
inputDirectory = "$projectDir/src/main/abc"
outputDirectory = "$buildDir/generated-sources/myplugin-abc"
}
}Vampire
12/01/2023, 10:38 AMStefan Schallerl
12/01/2023, 10:42 AMVampire
12/01/2023, 10:44 AMStefan Schallerl
12/01/2023, 10:57 AMThat is a function in the task, not an extension.as i said, i'll read the docs first and try to understand the components better. then i'll revisit your suggestions. if i haven't found a solution by then i'll come back here.
Stefan Schallerl
12/03/2023, 5:02 PMmyplugin {
add {
foo = bar
boo = baz
}
add {
// another
}
}
i think i got it right. anyway, it works for me. thanks for your help, @Vampire