Eric, kudos... I think were different plans in place for templating... but they are obviously lower on the priority list. This is a good crutch until that day. +1 for Spencer's suggestion... also... here is what I would like to see (besides it on github :)
The sourceset structures are defined in your plugins... it would be better to have these defined by the existing plugins. This would have a number of benefits, including allow folks to configure their source dir as they see fit (like to ./src instead of ./src/main/java ). also... it would be cool if there was a way of registering a type to a plugin... so you know which sourceset to use... this was you could type "createJavaClass" and this plugin would leverage the "java" plugin sourceset... where as the "createGroovyClass" would leverage the groovy plugin. There would be a new for registration or discovery in order to make this work. just some thoughts Ken Sipe | [email protected] | blog: http://kensipe.blogspot.com On Apr 19, 2011, at 2:44 PM, Spencer Allain wrote: > Digging through, this looks like exactly what much of the community has been > clamoring for. > > Couple it with the other enhancement request to be able to use > -I/--init-script or -b/--build-file apply from a remote URL and bootstrapping > a java/groovy project becomes very easy. > > So far, my only suggestion might be to change the task names to camel case so > that the task shortened-formed names will also work and be more consistent > with the base tasks that come with gradle. (i.e. createGroovyClass so it can > be invoked as gradle cGC) > > -Spencer > > --- On Mon, 4/18/11, Eric Berry <[email protected]> wrote: > > From: Eric Berry <[email protected]> > Subject: [gradle-user] ANN: A gradle templates plugin. > To: "Gradle Users" <[email protected]> > Date: Monday, April 18, 2011, 4:08 PM > > Hey all, I've been working on a basic templates plugin which can help new > Gradle users get up and running faster. > > I still have some work to do on the plugin, but it should be useable enough > to create new Gradle projects according to the default configurations, or to > use while going through the Gradle quickstart guides. > > It adds some a new group of tasks: > [quote] > Template tasks > -------------- > create-groovy-class - Creates a new Groovy class in the current project. > create-groovy-project - Creates a new Gradle Groovy project in a new > directory named after your project. > create-java-class - Creates a new Java class in the current project. > create-java-project - Creates a new Gradle Java project in a new directory > named after your project. > create-webapp-project - Creates a new Gradle Webapp project in a new > directory named after your project. > init-groovy-project - Initializes a new Gradle Groovy project in the current > directory. > init-java-project - Initializes a new Gradle Java project in the current > directory. > init-webapp-project - Initializes a new Gradle Webapp project in the current > directory. > [/quote] > > And should be easily extensible for others who want to create their own > templates. > > Feedback is always welcome. > > Project Home: https://launchpad.net/gradle-templates > Project Wiki: http://tellurianring.com/wiki/gradle/templates > > Cheers. > Eric > -- > Learn from the past. Live in the present. Plan for the future. > Blog: http://eric-berry.blogspot.com > jEdit <http://www.jedit.org> - Programmer's Text Editor > Bazaar <http://bazaar.canonical.com> - Version Control for Humans
