Griffon plugin for Gradle
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Griffon Gradle Plugin

This plugin for Gradle allows you to build Griffon projects. To use it, simply include the required JARs via buildscript {} and 'apply' the plugin:

buildscript {
    repositories {
        mavenRepo name: 'Codehaus',       url: ''
        mavenRepo name: 'SpringSource',   url: ''
        mavenRepo name: 'Sonaytpe',       url: ''
        mavenRepo name: 'Grails Central', url: ''
        mavenRepo name: 'JavaNet',        url: ''

    dependencies {

ext.griffonVersion = '1.2.0'
version = '0.1'

apply plugin: 'griffon'

repositories {
    mavenRepo name: 'Codehaus', url: ''

dependencies {
    compile "org.codehaus.griffon:griffon-rt:$griffonVersion"

You must include a version of the 'griffon-scripts' artifact in the 'classpath' configuration. You should also add whichever Griffon artifacts you need. 'griffon-rt' will give you everything you need for a standard Griffon application.

Once you have this build file, you can create a Griffon application with the 'init' task:

gradle init

Other standard tasks include:

  • clean
  • compile
  • run-app
  • test
  • assemble

You can also access any Griffon command by prefixing it with 'griffon-'. For example, to launch the application with Java Webstart:

gradle griffon-run-webstart

If you want to pass in some arguments, you can do so via the args project property:

gradle -Pargs='-group=Dialog' griffon-create-mvc

You can also change the environment via the env project property:

gradle -Penv=prod griffon-run-app

Warning The plugin does not allow you to execute multiple tasks in one command line. So gradle clean test will fail even if clean and test individually succeed.


  • Caused by: java.lang.NoClassDefFoundError: org/apache/commons/cli/Options

    This happens if your project depends on the 'groovy' JAR rather than 'groovy-all'. Change your dependency to the latter and all will be well.