Gradle counterpart to Maven archetype?

后端 未结 9 1289
情书的邮戳
情书的邮戳 2020-12-13 12:19

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?

相关标签:
9条回答
  • 2020-12-13 12:54

    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.

    0 讨论(0)
  • 2020-12-13 12:55

    Looks like solution is available now: https://plugins.gradle.org/plugin/com.orctom.archetype

    0 讨论(0)
  • 2020-12-13 12:56

    Gradle doesn't support this (yet). There's a open feature request opened already.

    0 讨论(0)
提交回复
热议问题