Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>BuildScript</h2> <pre><code>import org.grails.gradle.plugin.GrailsTask buildscript { repositories { mavenCentral() mavenRepo name: "grails", url: 'http://repo.grails.org/grails/repo' } dependencies { classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT" } } repositories { mavenCentral() mavenRepo name: "grails", url: 'http://repo.grails.org/grails/repo' } version = "1.0" grailsVersion = "2.1.0" apply plugin: "grails" dependencies { ['dependencies', 'resources', 'core', 'hibernate', 'plugin-datasource', 'plugin-domain-class', 'plugin-tomcat', 'plugin-services'].each { plugin -&gt; compile "org.grails:grails-$plugin:2.1.0" } bootstrap "org.codehaus.groovy:groovy-all:1.8.6" } GRAILS_TASK_PREFIX = "grails-" if (name.startsWith(GRAILS_TASK_PREFIX)) { project.task(name, type: GrailsTask) { command "${name - GRAILS_TASK_PREFIX}" } } </code></pre> <h2>Initialize</h2> <p>Then you can do <code>gradle init</code> to initialize the project structure</p> <h2>Commands</h2> <p>Use <code>gradle grails-[grails script]</code> to execute your grails commands. For example: <code>gradle grails-run-app</code> is equivalent to <code>grails run-app</code></p> <p>Hope this helps!</p> <h2>Update</h2> <p>This seems to work for Grails 2.3.2:</p> <pre><code>buildscript { repositories { mavenCentral() maven { url 'http://repo.grails.org/grails/repo' } } dependencies { classpath "org.grails:grails-gradle-plugin:2.0.0-SNAPSHOT" } } repositories { mavenCentral() maven { url 'http://repo.grails.org/grails/repo' } } version = "1.0" apply plugin: "grails" apply plugin: 'idea' grails { grailsVersion = "2.3.2" } dependencies { ['dependencies', 'core', 'spring', 'web', 'plugin-datasource', 'plugin-domain-class', 'plugin-controllers', 'plugin-services'].each { plugin -&gt; compile "org.grails:grails-$plugin:2.3.2" } compile 'org.grails.plugins:tomcat:7.0.42' compile 'org.grails.plugins:hibernate:3.6.10.3' compile 'com.h2database:h2:1.3.173' bootstrap "org.codehaus.groovy:groovy-all:2.1.9" } </code></pre> <p>A note, throws Exception when generating Grails wrapper, but <code>gradle init</code> seems to initialize the project structure properly otherwise. And, <code>gradle grails-run-app</code> seems to work fine too.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload