Skip to content

Conversation

@chadlwilson
Copy link
Collaborator

@chadlwilson chadlwilson commented Oct 16, 2025

Note that this is a mildly breaking change so might want to consider that, although if people are sensitive to the location, you'd hope they'd configure it specifically. Technically 12.1.8 was also a mildly breaking change when the directory got marked as an @OutputDirectory as it made Gradle explicitly aware of the ordering problems between tasks, rather than discovering it later.

Setting to the current build/reports directory tends to break task caching for other plugins since many of them put things into /reports including Gradle's reports/problems/problems-report.html, test reports into reports/tests. When ODC writes things there, Gradle isn't sure what to do as it implies ordering issues between tasks, either causing tasks to unnecessarily re-run, or users to need to define dependencies between tasks, which is quite confusing.

It requires a fair bit of Gradle experience to figure out that the ODC directory needs to be changed to work around it.

  • I considered declaring a set of @OutputFIles instead (which would be backward compatible) but that's not so safe/easy to do with the interface to ODC.
  • Changed @InputDirectory -> @Input. @InputDirectory is for directories whose contents you care about, and where it should cause the task to re-run if cached. In this case we only care about the path, not the contents.

TODO afterwards

  • Update website documentation

@jeremylong jeremylong changed the title fix: Change default output directory to build/reports/dependency-check to avoid clash with other reports fix!: Change default output directory to build/reports/dependency-check to avoid clash with other reports Oct 22, 2025
@jeremylong
Copy link
Contributor

I completely agree with the change - but this could be considered breaking by some. We do have plans for other breaking changes to be released soon. I'll include this then.

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

Successfully merging this pull request may close these issues.

@OutputDirectory conflicts with other plug-ins

2 participants