autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.77k stars 116 forks source link

Properly linkify report file in console #1057

Closed SimonMarquis closed 10 months ago

SimonMarquis commented 10 months ago

On Windows the current implementation would result in non-linkified output:

There were dependency violations. See report at E:\AndroidStudioProjects\nowinandroid\build\reports\dependency-analysis\build-health-report.txt 

But using the java.net.URI formatting will properly add the necessary triple slashes and replace backslack with regular forward slashes, making it supported on Windows as well:

There were dependency violations. See report at file:///E:/AndroidStudioProjects/nowinandroid/build/reports/dependency-analysis/build-health-report.txt 

(partially solved by https://github.com/autonomousapps/dependency-analysis-gradle-plugin/pull/669 initially)

SimonMarquis commented 10 months ago

Unfortunately I don't see the project-health-report.txt file path beeing logged.

SimonMarquis commented 10 months ago

Maybe this one could be refactored as well?

https://github.com/autonomousapps/dependency-analysis-gradle-plugin/blob/9967d87d0d2ae4499985f6b30507cacad88e83d5/src/main/kotlin/com/autonomousapps/tasks/FindInlineMembersTask.kt#L105

autonomousapps commented 10 months ago

Unfortunately I don't see the project-health-report.txt file path beeing logged.

oh right, that one always just prints to console.

Maybe this one could be refactored as well?

sure! thanks