Slackbot
05/31/2023, 3:44 PMVampire
05/31/2023, 3:52 PMtasks.withType<...>().all { ... }
which effectively is the same as tasks.withType<...> { ... }
.
I don't think anything changed since then.Clayton Walker
05/31/2023, 3:56 PMClayton Walker
05/31/2023, 3:58 PMwhenTaskRegistered
callback where the task is still TaskProvider<TheOtherTask>, in a context where I can call registerTask
. So the other task doesn’t have to get registered, and neither does mine if it’s not called.Vampire
05/31/2023, 4:03 PMVampire
05/31/2023, 4:04 PMJacocoReport
tasks, but derive them from where they are registered from. You will not get custom JacocoReport
tasks covered, but for the standard tasks it should work.Clayton Walker
05/31/2023, 4:06 PMVampire
05/31/2023, 4:07 PMephemient
05/31/2023, 4:07 PMephemient
05/31/2023, 4:12 PMtasks.addRule("after jacoco") {
val baseName = removeSuffix("JacocoReportFinisher")
if (equals(baseName)) return@addRule
tasks.register(this) {
dependsOn(baseName)
doLast { ... }
}
}
tasks.withType<JacocoReport>().configureEach {
finalizedBy("${name}JacocoReportFinisher")
}
completely untested but something along those linesVampire
05/31/2023, 4:21 PMAdam
05/31/2023, 4:26 PMdoLast {}
block, and dynamically registering inputs/outputs?Clayton Walker
05/31/2023, 4:28 PMClayton Walker
05/31/2023, 4:28 PMClayton Walker
05/31/2023, 4:28 PMClayton Walker
05/31/2023, 4:31 PMAdam
05/31/2023, 4:34 PMAdam
05/31/2023, 4:38 PMVampire
05/31/2023, 4:53 PMClayton Walker
05/31/2023, 5:04 PMjacoco-report-aggregation
plugin, see how that works.