Adding a plugin project to rake 3

In grails 2.x, we were allowed to add the plugin in place by adding the following to BuildConfig.groovy

grails.plugin.location. "my-plugin" = "../my-plugin"

My question is: can we add our local plugins in a similar way in place in grails3.0, and there is also another way to do this in grails.

The actual goal is to check the plugin whether it works correctly or not before clicking it on bintray.

+5
source share
2 answers

Yes there is. Grails 3 is based on Gradle, so multi-project builds of Gradle solve your problem.

Basically you add a dependency like: compile project(':../my-custom-plugin') and should change settings.gradle to enable the plugin: include '../my-custom-plugin'

Checking Grails documentation on Plugins and Multi-Project Builds at http://grails.imtqy.com/grails-doc/latest/guide/plugins.html

Another way is to install the plugin in the local maven repository using the gradle publishToMavenLocal and allow, if from there, before publishing to Bintray or another dependency repository.

In addition, starting with Grails 3.1.1, rebooting is now supported for built-in plugins. Check out https://github.com/grails/grails-core/releases/tag/v3.1.1 and http://grails.io/post/138665751278/grails-3-gradle-multi-project-builds

This is done using the syntax grails { plugins { . Copied from documents:

 grails { plugins { compile ":hibernate" compile project(':myplugin') } } 
+5
source

This multi-project thing is too big to answer in a short article. I just recently started with this, but, fortunately, now I have it. There is a tutorial on my site with a plugin that handles domain classes and services and all other subprojects (only one, the web application in this example) using the plugin. Code can also be downloaded. Here's the link: http://www.databaseapplications.com.au/grails-multi-app.jsp Make no mistake, there are a few things that you need to pay attention to.

0
source

Source: https://habr.com/ru/post/1242436/


All Articles