Skip to content

Conversation

@chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Nov 10, 2025

As discussed (completely off topic) in #337 (comment) the change in #341 changed the API signature here for 3.0 by requiring an @InputFile.

@bdellegrazie Given the breaking version number in 3.0 and the relatively trivial workaround[1], I don't really think that is a problem if we document it properly. Could add a comment to the GitHub release to be specific if we want.

There are Gradle-native ways to supply URL resources to inputs via the TextResource types.

[1] for 3.0 or later

allowedLicensesFile = resources.text.fromUri('https://<myurl>/allowed-licenses.json').asFile()

after this PR (delays retrieval until task needs to be configured)

allowedLicensesFile = resources.text.fromUri('https://<myurl>/allowed-licenses.json')

URL objects are no longer accepted due to use of @input File which only allows
    - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
    - A String or CharSequence URI, for example 'file:/usr/include'.
    - A File instance.
    - A Path instance.
    - A Directory instance.
    - A RegularFile instance.
    - A URI or URL instance of file.
    - A TextResource instance.
…le API

Also allows other canonical types such as URI, Path & Gradle RegularFile as documented by the error users will get if supplier the wrong type.
@chadlwilson chadlwilson force-pushed the tidy-up-allowed-licenses branch from 2c10882 to f17a782 Compare November 10, 2025 14:24
Copy link
Collaborator

@bdellegrazie bdellegrazie left a comment

Choose a reason for hiding this comment

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

Nicely done!

@bdellegrazie
Copy link
Collaborator

@chadlwilson I prefer this solution, then we can release and all will be well.

@chadlwilson chadlwilson closed this Dec 2, 2025
@chadlwilson chadlwilson deleted the tidy-up-allowed-licenses branch December 2, 2025 05:25
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