gradle使用

综合编程 2018-05-18

编译并打包 jar 文件,但不会执行单元测试。一些其他插件可能会增强这个任务的功能。例如,如果采用了 War 插件,这个任务便会为你的项目打出 War 包。

build = assemble + test

gradle build –refresh-dependencies 刷新依赖缓存

Build tasks

-———-

assemble - Assembles the outputs of this project.

build - Assembles and tests this project.

buildDependents - Assembles and tests this project and all projects that depend on it.

buildNeeded - Assembles and tests this project and all projects it depends on.

classes - Assembles main classes.

clean - Deletes the build directory.

jar - Assembles a jar archive containing the main classes.

testClasses - Assembles test classes.

Documentation tasks

-——————

javadoc - Generates Javadoc API documentation for the main source code.

Help tasks

-———

buildEnvironment - Displays all buildscript dependencies declared in project ‘:client’.

components - Displays the components produced by project ‘:client’. [incubating]

dependencies - Displays all dependencies declared in project ‘:client’.

dependencyInsight - Displays the insight into a specific dependency in project ‘:client’.

dependentComponents - Displays the dependent components of components in project ‘:client’. [incubating]

help - Displays a help message.

model - Displays the configuration model of project ‘:client’. [incubating]

projects - Displays the sub-projects of project ‘:client’.

properties - Displays the properties of project ‘:client’.

tasks - Displays the tasks runnable from project ‘:client’.

Publishing tasks

-—————

generatePomFileForMavenJavaPublication - Generates the Maven POM file for publication ‘mavenJava’.

publish - Publishes all publications produced by this project.

publishMavenJavaPublicationToMavenLocal - Publishes Maven publication ‘mavenJava’ to the local Maven repository.

publishMavenJavaPublicationToMeituan-nexus-snapshotsRepository - Publishes Maven publication ‘mavenJava’ to Maven repository ‘meituan-nexus-snapshots’.

publishToMavenLocal - Publishes all Maven publications produced by this project to the local Maven cache.

Verification tasks

-—————–

check - Runs all checks.

test - Runs the unit tests.

责编内容by:wei (源链)。感谢您的支持!

您可能感兴趣的

皮肤包项目的 Gradle 脚本演化 我在做的一个项目需要有换肤功能,换肤的方案是采用第三方库 ThemeSkinning 的实现(在其基础上修复若干 bug)。皮肤的制作是把相关的资源放在一个 app module 中打包成...
IntelliJ IDEA 2016 Maven项目配置JUnit 设置生成模式:File->Settings->Other Settings 修改模板:File->Settings->Oth...
Maven 3.5.3 发布,项目管理和构建工具 Maven 3.5.3 已发布, Apache Maven 是一个项目管理和构建工具。基于项目对象模型(POM)的概念, Maven 可以从中心位置管理项目的构建、报告和文档。 主要更新内容: ...
Android字节码插桩采坑笔记 俗话说“任何技术都是脱离了业务都将是空中楼阁”。最开始有研究字节码插桩技术冲动的是我们接入了一款统计类的SDK(这里我就不具体说是哪款了)。他们的套路是第三方开发者需要接入他们的插件(Gradle ...
Gradle学习(七)——持续构建 通常情况下,你会指定要执行的任务让Gradle来执行。Gradle会分析你给出的任务需要执行的所有任务集合,按照顺序全部执行他们,然后停下来等你的下一次指令。持续集成则不同,它会按照你给出的任务指令,...