#1114 print build path in projectHealth
Solves #1114 (only projectHealth, but not buildHealth).
Prints absolute path of according build.gradle of the project module. This can be pretty helpful in large multi-module projects, especially when there is no full matching between module name and submodule directory.
Sample task output:
> Task :utilities:projectHealth
/Users/morph/Projects/demo-gradle-multi-module/utilities/build.gradle
Unused dependencies which should be removed:
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
Using absolute path
The absolute path is printed intentionally as it seems to be the best trade-off.
This path is recognized in IDEA to open file in "Navigate to File...":
For instance, if relative path is used, there can be ambiguity:
Also, the relative path is not always in parent directory (for included builds) and printing "../../parent/build.gradle" will not help navigating to the file in the IDE.
I've updated the implementation moving the gradle file name prepending to ProjectHealthTask not to cache the GenerateProjectHealthReportTask output with absolute path (while it's not a task input).
I only worry about it being inconsistent with how buildHealth works
What would you prefer - address both projectHealth and buildHealth in scope of a single PR or implement them separately?
The problem here is that these two tasks have different ways to aggregate and format reports.