Gradle Build Setup Plugin

毕富
2023-12-01

Build Setup Plugin

The Gradle Build Setup plugin can be used to bootstrap the process of creating a new Gradle build. It supports creating brand new projects of different types as well as converting existing builds (e.g. An Apache Maven build) to be Gradle builds.

Gradle plugins typically need to be applied to a project before they can be used (see Section 21.1, “Applying plugins”). The Build Setup plugin is an automatically applied plugin, which means you do not need to apply it explicitly. To use the plugin, simply execute the task named setupBuildwhere you would like to create the Gradle build. There is no need to create a “stub” build.gradle file in order to apply the plugin.

It also leverages the wrapper task from the Wrapper plugin (see Chapter 48, Wrapper Plugin), which means that the Gradle Wrapper will also be installed into the project.

Gradle Build Setup插件可以让你启动一个新的Gradle工程。该插件是自动应用,所以不需要你显示的apply。使用它是要简单的执行gradle setupBuild,你都不需要准备build.gradle文件。

Build Setup Type

三种:java-library pom basic

默认是basic

使用方式 gradle setupBuild --type java-library

pom方式会自动去寻找pom.xml文件,然后转换成为Gradle项目。

更多具体内容请参考:http://www.gradle.org/docs/1.7/userguide/build_setup_plugin.html

 类似资料:

相关阅读

相关文章

相关问答