mannuk
mannuk

Reputation: 1269

Adding grails 3 plugin intro grails 2 project

Is there any posibility to make it work a plugin created using grails 3 as a dependency of a grails 2 project? Both projects use the same groovy version.

Upvotes: 2

Views: 89

Answers (1)

Jeff Scott Brown
Jeff Scott Brown

Reputation: 27255

Is there any posibility to make it work a plugin created using grails 3 as a dependency of a grails 2 project?

Not really. We re-wrote the plugin system in Grails 3 such that Grails 3 plugins are not compatible with Grails 2 and vice-versa.

That said, Grails 3 plugins are just .jar files. You could have a Grails 2 application which depends on a Grails 3 plugin (just express the dependency like a normal library dependency, not a plugin dependency) and then whatever classes are in the Grails 3 plugin jar will be available in the Grails 2 app, but you won't have any of the plugin specific behavior imposed, you would just have access to the classes in the jar. Depending on the particulars, that might or might not be helpful.

For the most part the answer to your question is "no".

Both projects use the same groovy version.

That doesn't sound right. I think the latest version of Grails 2 supports an earlier version of Groovy than the earliest version of Grails 3.

Upvotes: 1

Related Questions