# Building a plugin with Gradle and Elasticsearch 5.0

**URL:** <https://discuss.elastic.co/t/building-a-plugin-with-gradle-and-elasticsearch-5-0/65313>\
**Category:** Elasticsearch\
**Created:** [November 8, 2016, 7:54am UTC](https://discuss.elastic.co/t/building-a-plugin-with-gradle-and-elasticsearch-5-0/65313 "2016-11-08T07:54:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 8, 2016, 12:42pm UTC](https://discuss.elastic.co/t/building-a-plugin-with-gradle-and-elasticsearch-5-0/65313/2 "2016-11-08T12:42:48Z")

</div>

> [@Damien\_Alexandre](#):
>
> I read somewhere that since 5.0, plugin authors must release a new version of their plugins every-time Elasticsearch bump a version, is that correct? Even if nothing changes in the plugin?

We check that the version that of Elasticsearch that the plugin was declared to have been built against matches the version you are running it with **exactly**. This is because plugins get access to all the internal interfaces and classes which we change as needed.

> [@Damien\_Alexandre](#):
>
> My plugin require the latest ICU (58.1) and I have no idea what will happens if an user try to enable both my plugin (ICU 58.1) and the official analysis-icu plugin (ICU 54.1). Maybe I can declare that my plugin should not be enabled alongside analysis-icu? Or will it works ok to have two modules loading their own versions of ICU?

It should work fine. All plugins are loaded in child classloaders.

> [@Damien\_Alexandre](#):
>
> And is it possible to just extend the core analysis-icu plugin? That way my plugin could just add new tokenizer on top of it?

Plugins can't extend plugins at this point. They can't see plugins at all because of the child classloader. We needed this to make plugin security work. You can certainly fork the analysis-icu plugin as a starting point.

> [@Damien\_Alexandre](#):
>
> Is there a magic I didn't see to import this method in the tests?

It is a static method on ESTestCase so it ought to work....

> [@Damien\_Alexandre](#):
>
> I looked at the code, but didn't find a better way to have the default rules + my edits in place

I don't really know ICU so I'm not sure. One advantage that you have is that you tightly control all the versions so while upgrading ICU may break it, no one is going to sneak that in on you.

---

_[View the full topic](https://discuss.elastic.co/t/building-a-plugin-with-gradle-and-elasticsearch-5-0/65313)._
