-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Refactor: Convert PluginPropertiesExtension to Java (#34459) #36673
Conversation
@fabiodrg666 |
Pinging @elastic/es-core-infra |
*/ | ||
public class PluginPropertiesExtension { | ||
|
||
@Input |
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.
In groovy, the Input
annotation adds the get/set capabilities, and is automatically tracked. However, that is for tasks. I'm not sure it actually makes sense (and was erroneous but harmless in the old groovy code). @atorok can you confirm my understanding? If so, I think all these Input annotations should be removed.
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.
That's right, the annotations don't do anything on extensions, their for tasks and need to be placed on the getter method in Java ( having them on properties works on Groovy only )
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.
Thanks for your feedback, I will remove the Input
annotations.
@fabiodrg666 are you still interested in getting this PR in? |
Overlaps with #39605 |
@fabiodrg666 I'm going to close this, please reopen if you plan to work on it |
This is the first time I am working at this level with Gradle, so I went through some challenges. One of them is not yet solved, which is how to access the extra properties from
Project
. Whenever I try to compile it fails saying theext
symbol is not defined (project.ext
).I am looking into Gradle documentation for days, and I can't find a workaround for this. I was having similar issues when accessing properties such
version
orname
, but I could solve it buy using the methods available. Probably I am misunderstanding how this works. If anyone could provide some help, I would appreciate it a lot.Due the problem with accessing the extra properties, the following methods are not completed, but they aren't used at the moment, so I decided to create the pull request anyway, and hopefully with the community and elastic team insights I will be able to complete this task.
setLicenseFile()
setNoticeFile()