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 【阅读原文】。感谢您的支持!

您可能感兴趣的

Disabling / Pause Database Replication Usi... I want to disable the Database Replication from the replica cluster in MarkLogic 8 using ML-Gradle. After updating t...
Gradle 系列学习(一) 看不懂的 build.gradle 代码... Android Studio 这么强大的工具,就算我们不懂 gradle, groovy, 也照样能借助AS对 Android 项目进行编译、调试、运行、打包等操作。build.gradle 这个文件接触这么久了,基本的项目配置也基本...
AppPlugin源码解析 之前为了优化内部的Route, 去看了下 TransformAPI , 然后就顺便看了下 AppPlugin 的源码 本篇源码基于android gradle 3.0.1的版本. 总入...
借助Gradle Plugin解决模块化开发中模块如何对外暴露接口... 直奔主题,在模块化开发中,模块间的数据交流大多数同学会采用以接口作为通信协议的方式。需要面对的问题有以下几点: 接口由谁来维护? 这个问题简单,由提供服务的模块来维护。 接口怎么暴露? 打成jar包,发布到m...
GoodPrefs GoodPrefs GoodPrefs is An Android library for easy access to Android Shared preferences Install library ...