创建一个测试二进制文件 - Gradle [英] Creating a Jar of test binaries - Gradle
问题描述
我正在使用最新版本的Gradle(里程碑9),我试图弄清楚如何创建所有测试二进制文件的Jar。
从我在互联网上找到的内容可以看出:
task packageTests(type:Jar){$ b $ from sourceSets.test.classes
}
然而,我得到了 - $ /
无法获取源集$上的只写属性'classes'的值
测试。
什么是正在编码我想要达到的方法?
属性'classes'现在不太赞成吗?
更改 sourceSets.test.classes
到 sourceSets.test.output
解决了这个问题。
I'm using the latest version of Gradle (milestone 9), and I'm trying to figure out how to create a Jar of all test binaries.
From what I've found on the internet, the following should work:
task packageTests(type: Jar) {
from sourceSets.test.classes
}
However I am getting a -
Cannot get the value of write-only property 'classes' on source set test.
What is the correct way of coding what I'm trying to achieve?
Is the property 'classes' somehow deprecated now ?
Changing sourceSets.test.classes
to sourceSets.test.output
fixes the problem.
这篇关于创建一个测试二进制文件 - Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!