Tuesday, July 13, 2010

AppEngine and Gradle

I have a project that was initiallly created using Eclipse and the Google Eclipse plugin. This creates a project structure where the web resources go in /war and the java resources go in /src. What I would like to be a be able to do is execute gradle build or gradle jettyRun and execute the web app from the command line. Here are the modifications that I had to make to get this to work.


apply plugin:'war'
apply plugin:'jetty'

sourceSets {
main {
java {
srcDir 'src'
}
}
}

war {
from 'war'
}

jettyRun{
webAppSourceDirectory = new File('war')
}

No comments: