-
Notifications
You must be signed in to change notification settings - Fork 25
Compatibility with Gradle 7.0 #121
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
Conversation
jmatsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! When did the error happen by the way? I think we can cover the case through GradleCompatAcceptanceSpec by adding Gradle 7.0 to the seeds if it's when applying the plugin or running any task (i.e. evaluation at the runtime),
|
|
||
| CountDownLatch latch | ||
| @Internal CountDownLatch latch | ||
| boolean saved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need Internal here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a private getter method below so Gradle considers save is @Internal 👍 (If we have @Internal for save with the private getter method, Gradle complains the redundant annotation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha! 💯
| [System.getenv(DeployGatePlugin.ENV_NAME_API_TOKEN)].any() | ||
| } | ||
|
|
||
| // From Gradle 7.0, only one method to get boolean property value is allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
|
The error raised when executing |
jmatsu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
|
|
||
| CountDownLatch latch | ||
| @Internal CountDownLatch latch | ||
| boolean saved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha! 💯
Starting from Gradle 7.0, we need to explicitly annotate the properties with
@Input,@Outputor@Internal. Also only one getter method is allowed for a property whereas Groovy generates 2 getters (isXXX()andgetXXX()) for boolean property.This pull request adds annotations (
LoginTaskandUploadArtifactTaskproperties are not for inputs or outputs so I annotated with@Internal) and suppress generatinggetXXX()for boolean property by havingisXXX()method explicitly.see also: