-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add details for gradle custom plugin. #144
Conversation
Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]> Custom plugin's readme Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Hey @dblock can you please review this PR? |
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Thanks @gaiksaya, added all your suggestions in the latest commits. |
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.
I think this belongs in "Building Plugins with OpenSearch", ie. BUILDING.md.
I'd also want to see examples implemented in https://github.com/opensearch-project/opensearch-plugin-template-java that match the doc.
Hey @dblock, you suggest to move the data of |
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Hey @dblock migrated the details to |
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.
I mostly have nitpicks, the doc is good!
[Plugin Code](https://github.com/opensearch-project/OpenSearch/tree/main/buildSrc/src/main/java/org/opensearch/gradle/pluginzip), [Plugin Tests](https://github.com/opensearch-project/OpenSearch/tree/main/buildSrc/src/test/java/org/opensearch/gradle/pluginzip), [Plugin META-INF](https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.pluginzip.properties) | ||
|
||
|
||
#### Plugin Design |
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.
I would remove this title.
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.
Wont it be easy to check the plugin code location, if a user wants to know more details about this ?
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.
The documentation for the plugin belongs with the plugin in its code. You can add these things as comments in the plugin itself. This doc is just about how to use it.
BUILDING.md
Outdated
|
||
#### Plugin Usage | ||
|
||
* The Key requirement for this plugin to work is that the zip should be generated by `bundlePlugin` task that comes from existing [PublishPlugin](https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java). |
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.
Make the steps numbered, 1.2.3
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.
@dblock so instead of *
you suggest add number ?
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.
It's not an enumeration, I'd just write the text as is without any *
.
BUILDING.md
Outdated
|
||
Note: If there is a managed `build.sh` file and do not have any publish tasks, then its not required to exlcude these tasks, only required if it is calling publish tasks that targets ALL repos and ALL publications. | ||
|
||
* Quick Example: |
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.
Point to a PR instead of lines of code, these links will stop working when those files are edited for whatever reason.
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.
@dblock the plugins have not yet started to use to this gradle plugin, so we dont yet have a PR, once this document is merged and I have a PR as an example, then I can update the doc back again.
@@ -6,6 +6,10 @@ | |||
- [Always Build SNAPSHOT Artifacts](#always-build-snapshot-artifacts) | |||
- [Consume Maven Artifacts in Order](#consume-maven-artifacts-in-order) | |||
- [Include Checksums in Maven Publications](#include-checksums-in-maven-publications) | |||
- [Custom Gradle Plugins](#custom-gradle-plugins) | |||
- [opensearch.pluginzip](#opensearchpluginzip) | |||
- [Plugin Design](#plugin-design) |
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.
I would get rid of sub-sections and make it one entry (opensearch.pluginzip).
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.
would it not be easy for a user to read sub-sections rather than a bit fat single section about the plugin? :)
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
@dblock Can we go ahead and merge this PR and work on the nitpicks later? I would like to see the teams start publishing the plugin zips from 2.0 GA version. |
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi <[email protected]>
Hey @dblock I have pushed some suggested NIT's, please review. |
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.
This looks good! I would just move the whole plugin design thing out. But also you can iterate on this later.
[Plugin Code](https://github.com/opensearch-project/OpenSearch/tree/main/buildSrc/src/main/java/org/opensearch/gradle/pluginzip), [Plugin Tests](https://github.com/opensearch-project/OpenSearch/tree/main/buildSrc/src/test/java/org/opensearch/gradle/pluginzip), [Plugin META-INF](https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.pluginzip.properties) | ||
|
||
|
||
#### Plugin Design |
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.
The documentation for the plugin belongs with the plugin in its code. You can add these things as comments in the plugin itself. This doc is just about how to use it.
BUILDING.md
Outdated
|
||
#### Plugin Usage | ||
|
||
1. The Key requirement for this plugin to work is that the zip should be generated by `bundlePlugin` task that comes from existing [PublishPlugin](https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java). |
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.
Nit: try to shorten things, e.g. "The Key requirement for this plugin to work is that the zip should be generated by bundlePlugin
task" is the same as "Ensure that your project uses bundlePlugin".
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.
Fixed this @dblock
Signed-off-by: pgodithi <[email protected]>
Signed-off-by: pgodithi [email protected]
Custom plugin's readme
Description
This PR will add a doc for gradle custom plugins and explains in details on how to use
opensearch.pluginzip
pluginIssues Resolved
#143
Associated issues
opensearch-project/opensearch-build#1916
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.