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

Express compile classpath as a FileCollection, propagating dependencies #31

Merged

Conversation

DSteve595
Copy link
Contributor

@DSteve595 DSteve595 commented Feb 16, 2022

Currently, Module.compileClasspath is a Collection<File>. This works for holding the set of files in the classpath. However, Gradle stores information about how those files are generated in a FileCollection, which is generally how plugins expose compile classpaths. When a task depends on a FileCollection, these generation dependencies are propagated to the task. Without those dependencies, the task won't generate those files as needed, which causes #9.
This changes Module.compileClasspath to be a FileCollection, and adds it as an input to the signature generation task. As a result, tasks that generate code for the compile classpath will be run when running metalavaGenerateSignature, which is desired.

Side note: I agree with many of the changes in #28, which has some overlap with this change. This is a smaller fix that also addresses the first issue described in that PR.

Copy link
Owner

@tylerbwong tylerbwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@tylerbwong tylerbwong merged commit d0420dd into tylerbwong:main Feb 18, 2022
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.

2 participants