没有测试的 Gradle 构建 [英] Gradle build without tests

查看:31
本文介绍了没有测试的 Gradle 构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不执行单元测试的情况下执行 gradle build.我试过了:

I want to execute gradle build without executing the unit tests. I tried:

$ gradle -Dskip.tests build

这似乎没有任何作用.我可以使用其他一些命令吗?

That doesn't seem to do anything. Is there some other command I could use?

推荐答案

您应该使用排除任何任务的 -x 命令行参数.

You should use the -x command line argument which excludes any task.

试试:

gradle build -x test 

更新:

彼得评论中的链接已更改.下面是 图表docs.gradle.org/current/userguide/java_plugin.html" rel="noreferrer">Gradle 用户指南

The link in Peter's comment changed. Here is the diagram from the Gradle user's guide

这篇关于没有测试的 Gradle 构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆