jfrog/gradle-dep-tree

Resolving rootProject.buildDir too early, should be a DirectoryProperty

Opened this issue · 0 comments

enaess commented

private final Path pluginOutputDir = Paths.get(getProject().getRootProject().getBuildDir().getPath(), "gradle-dep-tree");

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)?