Hi, I've got a kotlin multi-platform multi-project...
# gradle
n
Hi, I've got a kotlin multi-platform multi-project build and I'm having trouble figuring out how to set the test reports output directory. I've tried (in my root build.gradle.kts):
Copy code
allprojects {
	this.tasks.withType<TestReport> {
		this.destinationDir = rootProject.buildDir.resolve("<mailto:reports/${this@allprojects.name|reports/${this@allprojects.name>}/")
	}
	this.tasks.withType<Test> {
		this.reports.junitXml.destination = rootProject.buildDir.resolve("<mailto:reports/${this@allprojects.name|reports/${this@allprojects.name>}/xml/")
		this.reports.html.destination = rootProject.buildDir.resolve("<mailto:reports/${this@allprojects.name|reports/${this@allprojects.name>}/html/")
	}
}
But that doesn't seem to work. What's strange is that if I run clean / test repeatedly sometimes they end up where I'm declaring, but it's unreliable. It's as if I'm declaring this in the wrong spot.
Ok, wrapping in an afterEvaluate {} block seemed to work. I'm still a little unclear on the timing of that -- without the after evaluate block I still can see the tasks I'm trying to configure, so I'm guessing allprojects {} is after tasks are added, but before they're configured?