Multiple plugins in a single archive with new the plugin mechanism?


I’d like to use the new plugin mechanism for 2 plugins. However when I originally developped it, I embedded the 2 plugins in a single JAR as they are very related, and, you know, “the build system shouldn’t prevent me from doing that”. :stuck_out_tongue: That used to work fine with the previous mechanism.

How does one achieve the same using the new mechanism? I can’t seem to specify 2 “gradle-plugin” attributes in bintray. Is it a bad practise?

Cheers, Rémy

Hi Remy,

The Bintray UI does allow this. You should be able to just create another attribute with the same name. There are quite a few plugins that do this.

Hi Luke,

I actually gave that a try but the attribute edit screen seems to enforce unicity. Given that I already uploaded a version 1.0 with gradle-plugin = A If I try and edit version 1.0 to add gradle-plugin = B Then the previous entry is replaced with the new one, and I end up with only gradle-plugin = B

Seems the bintray UI has changed. To declare multiple plugin IDs, just assign a comma separated listof plugin ids to the gradle-plugin attribute. e.g:

    gradle-plugin =  org.acme.some-plugin:org.acme:some-plugin,org.acme.some-other-plugin:org.acme:some-other-plugin 

Nice, thanks for the tip Rene!

I did look around but was unable to find this precious piece of information :slight_smile: