Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
enaess opened this issue Oct 20, 2023 · 0 comments
Open

Comments

@enaess
Copy link

enaess commented Oct 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant