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-Plugin 插件 官方文档给出了详细的实现步骤,笔者 将参考官方文档做一些基础介绍,额外增加一个实例: 通过自定义插件修改编译后的class文件 ,本文按照以下三个方面进行讲解 插件基础介绍 三种插件的打包方式 实例Demo&Debug调试 插件基础介绍 根据插件官方...
Getting started with Microclimate When I started building my first application based on a Microservice Architecture pattern, I knew about the basic idea of microservices and I knew a...
Replugin详解 前言 继上次爬完了热修复的坑位,中途爬了各种各样的坑。今天我们来说说插件化Replugin的坑位。Replugin刚出的时候我就看过了。第一次看的时候可能心态不好。没看懂= =第二次重头在看,发现蛮简单的,可能一两个小时就搞定了。但是这玩意出来我就知道了。今天才整理。这就可想而知,坑位多的有点可...
Android Studio太卡以及常见的Gradle相关错误... 提高JVM的内存限制 配置步骤: Android Studio --> help --> Edit Custom VM Options 然后在文件里添加: -Xms2048m -Xmx2048m -XX:MaxPermSize=2048m -XX:ReservedCode...
Android Gradle Git versioning Version your android app based on git tag and revision Create git-versioning.gradle in project root def versioningExecuteCommand = { cmd -&...