How to publish your Grails 3 plugin to Bintray

Benoit Hediard
Mar 9, 2015 · 4 min read

With Grails 3 now available, we have started to migrate some of our Grails 2 plugins. Here is a quick guide to share your experience on how to distribute a Grails 3 Plugin. Feedback is welcome!

To migrate your plugins and apps, follow the detailed explanation from Grails 3 docs:

You might also check this Grails 2 plugin that automatically performs a partial migration:

To distribute your plugins, the recommended way is to use Bintray, a package hosting and download center infrastructure for automated software distribution. It’s free for open source!

On the Bintray side

  • signup/signin to (one-click signin with GitHub or Twitter),
  • if required, create an organization (if you want to collaborate on a shared repository),
  • create a new maven repository called plugins on your account (or the created organization),
Image for post
Image for post
  • edit your Bintray profile to get your personal API Key,
  • add BINTRAY_USER and BINTRAY_KEY to your env variables (on OS X, add it to your .bash_profile or .bash_rc)
export BINTRAY_USER=benorama
export BINTRAY_KEY=xxxxxxxxxxxxxxxxxx

On the Grails side (Grails 3.1 and beyond)

  • run grails create-plugin my-plugin,
  • from Grails 3.1.x, there is new Gradle plugins available to simplify publishing of plugins and profiles. It should be in your build.gradle when you create a new plugin.
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-plugin-publish"
  • edit build.gradle to customize default configuration as you wish , for example:
grailsPublish {
user = 'user' // Not required if you defined BINTRAY_USER var
key = 'key' // Not required if you defined BINTRAY_KEY var
userOrg = 'mycompany' // Optional
repo = 'myrepo' // Optional, default to 'plugins'
githubSlug = 'foo/bar'
license {
name = 'Apache-2.0'
title = "My Plugin Title"
desc = "My Plugin Description"
developers = [johndoe:"John Doe"]

On the Grails side (Grails 3.0.x)

// Replace benorama by your github user/organization name
// Note: right now, only plugins with 'org.grails.plugins' group are listed by 'grails list-plugins' command
version "0.1"
group "org.grails.plugins" // Or your own user/organization
bintray {
pkg {
userOrg = '' // If you want to publish to an organization
name = "$"
issueTrackerUrl = "$"
vcsUrl = "$"
version {
attributes = ['grails-plugin': "$$"]
name = project.version

To publish your Grails 3 plugin

  • now, simply run gradle bintrayUpload from your project root.

Et voila !
Your first Grails 3 plugin is published and available to everyone.

Note: if you want to add your plugin to the official plugins repository, go to, click on Include my package button and wait for Grails team validation.

To use your Grails 3 plugin

Add your plugins repo and plugin dependency to your Grails 3 app in its build.gradle :

// Replace benorama by your user/organization name
repositories {
maven { url "" }
dependencies {
compile "org.grails.plugins:my-plugin:0.1"


Bobby Warner has created a nice FAQ blog post about Publishing Grails 3 Plugins.

Note: we’re hiring! Are you kick-ass fullstack or front-end dev that want to work on Angular 2, Java or Groovy? You must contact me to join our dream team in Paris!

If you liked this article, please hit the ❤ button to recommend it. This will make it easier for other Medium users to discover this.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store