This message was deleted.
# dependency-management
s
This message was deleted.
1
v
Yes, that only refers to the CLI I think. You can use
gradle.includedBuild("tooling").task(":task")
though.
f
Ah, got stuck on that part of the documentation missing that this was further down. Thanks as usual
👌 1
Kind of related. Do you know of any way to achieve a common test report with included builds without using the test aggregation plugins?
Copy code
tasks.register("testReport", TestReport.class) {
    dependsOn test
    destinationDirectory = file("$buildDir/reports/allTests")
    // Include the results from the `test` task in all subprojects
    var testList = (subprojects - [dependencyProject])*.test
    testList.add(gradle.includedBuild("tooling").task(":test"))
    testResults.from = testList
}
The above is obviously not working, but kind of shows what I want to do.
v
Why do you not want to use the test aggregation plugin?
f
I do want to use it. But we have a horrible plugin written in 2016 that we can’t get rid of that interferes with it and makes my life awful
If there is no easy workaround then I’ll have to live with it simply
v
Safely sharing outputs between projects or even builds is not trivial. That's why those aggregation plugins exist that do it for common cases. You can of course do the same manually, but the question is whether that will also interfer with that plugin. The procedure(s) how to safely share outputs between projects is documented at https://docs.gradle.org/current/userguide/cross_project_publications.html. And that is basically what those aggregation plugins also do.
👀 1
f
Thanks, I’ll have a look and asses if we can do this, or if I just get more reasons to argue for a complete refactor!
👌 1