Slackbot
12/13/2023, 6:12 PMVampire
12/13/2023, 6:14 PMfigured I'd change threads👌
wdymBy using
it.tasks you reach into the model of the subproject which is bad.
It works in this case as the task is always there, but latest with project isolation this should fail. With the string-y version I suggested instead you should not have that problem.Caleb Cushing
12/13/2023, 7:03 PMCaleb Cushing
12/13/2023, 7:04 PMJavi
12/13/2023, 9:27 PM// TODO: Remove `allprojects` as it is incompatible with project isolation
val testResults: List<TaskCollection<Test>> =
project.allprojects.map { it.tasks.withType<Test>() }
allTestsReportTask.configure { task ->
task.destinationDirectory.set(allTestsDir)
task.testResults.from(testResults)
}
I have that TODO as I was thinking in using some custom configuration to aggregate everything, but it would be a bit annoyingVampire
12/14/2023, 2:12 AMdependencies (doesn't really have to build it, it just needs to be stated that it is coming from there) and then depend on that configuration from the root project.
But imho it is too much ceremony for this use-case and here the string-y version should be appropriate. 🙂
> I have that TODO as I was thinking in using some custom configuration to aggregate everything, but it would be a bit annoying
Well, as I just also described this, that's indeed the way to go for inter-project sharing / depending if not wanting to reach into other projects models and not wanting to use string task dependencies. 🙂