On 14/02/2011, at 8:38 AM, James Carr wrote:

> Hey All,
> 
> Stop me if this has been brought up before, but I would definitely
> find it beneficial if gradle could support something similar to maven
> archetypes. Are there any plans to implement something similar?

Yes, absolutely. It's just a matter of starting work on it.

There's a few missing pieces in some of our infrastructure which would help 
make this work nicely:

* Some way to implicitly apply a plugin from the command-line. For example, 
when you do 'gradle createProject', Gradle would automatically apply the 
archetype plugin to add the 'createProject' task. We'd also use this feature 
for tasks such as 'wrapper', 'idea', 'eclipse', and possibly also 'tasks', 
'projects', 'properties' and 'dependencies'.

* Improve how you can pass input to tasks from the command-line. For example, 
we might add some way for Gradle to map command-line arguments to task 
properties, and maybe have Gradle prompt for missing pieces.

The net result is I can do something like:

gradle createProject

and Gradle prompts me for all the information it needs. Or I can run

gradle createProject --name myProject --java --groovy

and Gradle gets on with creating my project.

Later, we might add things like:

* Running 'gradle help <some-task>' shows some usage information about the 
specified task. You could use this to get help with using the 'createProject' 
task.

* Automatically download plugins, including those implicitly applied on the 
command-line.

* Make these features public so you can use them with your own plugins and 
tasks.

* Wire this stuff into the UI and IDE plugins, to offer a wizard to create 
projects.

* Possibly replace the monolithic 'createProject' task with several tasks which 
add some feature to an existing project (possibly empty). For example, gradle 
makeJavaProject might add Java capabilities to the project, creating the 
missing pieces. You might be able to add groovy, scala, web, or whatever 
support to a project.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to