-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Correctly annotate Gradle task in- & outputs and enable stricter plugin validation #21957
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
Correctly annotate Gradle task in- & outputs and enable stricter plugin validation #21957
Conversation
Gradle's task input and output annotations should be applied to the accessors instead of the properties. No adhering to this can cause funky behavior in the generated stubs. Examples of this can be found in the docs: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html Also adds missing annotations so that validation passes
thanks for the PR, which has been merged |
…in validation (OpenAPITools#21957) * Correctly apply Gradle task input & output annotations to accessors Gradle's task input and output annotations should be applied to the accessors instead of the properties. No adhering to this can cause funky behavior in the generated stubs. Examples of this can be found in the docs: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html Also adds missing annotations so that validation passes * Enable strict Gradle plugin validation
@TheMrMilchmann was this tested with gradle 9? I'm seeing weird behavior when trying to configure
|
@NielsDoucet This is not directly related to this PR, but there is indeed an issue blocking Gradle 9 compatibility. Gradle 9 uses nullability annotations to enforce generic bounds more strictly in some cases. You're hitting this one:
https://docs.gradle.org/current/userguide/upgrading_major_version_9.html#jspecify As I'm also interested in Gradle 9 compatibility, I'll see if I can quickly put a PR together to fix this, although I'm not sure how to do this in a backwards-compatible way. |
I created #22050 to tackle this. |
Gradle's task input and output annotations should be applied to the accessors instead of the properties. Not adhering to this can cause funky behavior in the generated stubs. Examples of this can be found in the docs: https://docs.gradle.org/current/userguide/implementing_custom_tasks.html
Also adds missing annotations so that stricter validation passes.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)"fixes #123"
present in the PR description)