Gradle counterpart to Maven archetype?

deamon picture deamon · Jul 17, 2012 · Viewed 25.1k times · Source

What is the Gradle counterpart to Maven archetypes? How can I give other Gradle users a template for the file and directory layout for a new project?

Answer

pavel_kazlou picture pavel_kazlou · Sep 25, 2013

Use build init plugin:

~$ mkdir newproj
~$ cd newproj
~/newproj$ gradle init --type java-library

At the moment java-library, scala-library, groovy-library, java-application, pom and basic supported. The feature is incubating, thus it can be changed in future releases, so keep an eye on docs.