Build gradle plugins with maven?

Hi

Would it be possible to get a way to build a gradle plugin using maven (project having chosen maven and building mvn plugin, ant task and gradle plugins is quite common for big projects)?

A need which is not handled today is to create custom archive types (war like typically in my case)

All is doable in build.gradle but it is nicer to just apply a plugin which will replace jar/war by the custom-ar

I was basically blocked on the fact Jar and War classes were in gradle-plugins.

It’s not a supported feature, and although nothing is preventing you from downloading the Gradle distribution and putting the Gradle Jars on Maven’s compile class path, I wouldn’t recommend it.

I don’t understand your other statements, so I can’t comment on them.

What prevent me to use local path is the fact the project should build without local setup excepted maven. There are hacks but it doesn’t worth going these ways and waiting a later gradle release is acceptable (this is not feature we need in the next month).

Basically the plugin would be exactly the war one excepted it would build a bar (dedicated to batch) instead of a war.

My first throuht was to copy war plugin but this one is not in a deployed api jar.

The plan is to provide a Gradle-based SDK for building plugins. I haven’t heard of any plans to support building plugins with Maven.

Well, support can just be to deploy binaries on central, it would be far enough.

Btw, since there are workarounds no need to discuss further if that’s not in the roadmap.

Sorry, it isn’t.

Can you comment on the why you can’t deploy the gradle libraries to central? What’s the actual problem with this? I am building a plugin that should work with both gradle and maven. Most of the code is actually shared between the two

It would be fairly natural for me to build the whole project with a single command but I just can’t. I agree that Maven does not support building plugins with Gradle but on the other hand my plugin is a jar file with a single class. That’s a bit frustrating that the only limitation is that you guys don’t push your librairies to central.

The decision was made by the Gradle founders, and I can’t speak for them.

WTF, gradle has only a black and white thinking?

IMHO, gradle tries the same battle like jenkins vs. hudson. But it’s not clear what’s gradles future. :slight_smile:

Peter, I understand you can’t speak for them but it’s an open forum. How about them replying to this thread then?

Thanks!

They don’t usually get to read/reply here, as they already have too many other things on their schedule. If you absolutely want to know their reasons, perhaps try to contact them directly.

Gradle plugins are just “jars” now, but this is going to change relatively soon and we always knew this was coming.

Plugins are soon going to have their own metadata and possibly a non standard bootstrapping mechanism to support classloader isolation. We aren’t likely to ever invest in custom Maven tooling that supports the same thing. Just publishing the JARs would not be enough going forward.

That makes sense. Thanks for the answer.