我在一个子项目(A)中有配置,可以生成测试构件:
configurations {
testArtifacts.extendsFrom testRuntime
}
task testJar(type: Jar) {
classifier "test"
from sourceSets.test.output
}
artifacts {
testArtifacts testJar
}
在另一个子项目(B)中,我想使用这个工件:
compile project (path: ":a-sub-project", configuration: 'testArtifacts')
这在gradle中完美运行,但是当我通过内置支持将项目导入idea时,idea无法看到该构件中的类。它可以看到(A)的主要构件中的类,但不能看到测试构件中的类。
有什么想法吗?
PS. Idea 14.1.4,gradle 2.3。