Gradle counterpart to Maven archetype?

后端 未结 9 1287
情书的邮戳
情书的邮戳 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:46

    There is no gradle counterpart as far as I know. However following the steps given below is enough for most cases:

    • Generate project with maven and your selection of maven archetype.
    • Convert the maven project to gradle project. You can do that by executing the below command in the directory where your master pom.xml is located:
    gradle init
    

    It is supposed to work with all basic maven archetypes.

提交回复
热议问题