Add details for gradle custom plugin.#144
Add details for gradle custom plugin.#144dblock merged 16 commits intoopensearch-project:mainfrom prudhvigodithi:main
Conversation
Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com> Custom plugin's readme Signed-off-by: pgodithi <pgodithi@amazon.com>
|
Hey @dblock can you please review this PR? |
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
|
Thanks @gaiksaya, added all your suggestions in the latest commits. |
dblock
left a comment
There was a problem hiding this comment.
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 <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
|
Hey @dblock migrated the details to |
dblock
left a comment
There was a problem hiding this comment.
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.
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.
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.
@dblock so instead of * you suggest add number ?
There was a problem hiding this comment.
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.
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.
@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.
| - [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.
I would get rid of sub-sections and make it one entry (opensearch.pluginzip).
There was a problem hiding this comment.
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 <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
@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 <pgodithi@amazon.com>
Signed-off-by: pgodithi <pgodithi@amazon.com>
|
Hey @dblock I have pushed some suggested NIT's, please review. |
dblock
left a comment
There was a problem hiding this comment.
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.
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.
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".
Signed-off-by: pgodithi <pgodithi@amazon.com>
Signed-off-by: pgodithi pgodithi@amazon.com
Custom plugin's readme
Description
This PR will add a doc for gradle custom plugins and explains in details on how to use
opensearch.pluginzippluginIssues 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.