jfrog / gradle-dep-tree

Gradle plugin that reads the Gradle dependencies of a given Gradle project, and generates a dependency tree.
Apache License 2.0
12 stars 6 forks source link

Resolving rootProject.buildDir too early, should be a DirectoryProperty #20

Open enaess opened 11 months ago

enaess commented 11 months ago

https://github.com/jfrog/gradle-dep-tree/blob/9f4dc78495ab38b42fab0f26a344f022aa979379/src/main/java/com/jfrog/tasks/GenerateDepTrees.java#L35

This code seems to resolve the buildDir too early. When jf audit runs my gradle build, it resolves the build directory to <project>/build, whereas I've set it in my project to /target/build, as "build" was actually a directory created many years ago and can't be changed.

Perhaps better yet to store this variable as a DirectoryProperty as an input for the task, and let it dynamically be resolved to "target/build" as I have configured to be in my project (and run during afterEvaluate)?