Gradle Test Dependency

前端 未结 7 1682
一整个雨季
一整个雨季 2020-11-28 04:26

I have two projects, project A and Project B. Both are written in groovy and use gradle as their build system.

Project A requires project B. This holds for both th

7条回答
  •  长情又很酷
    2020-11-28 04:42

    The above solution works, but not for the latest version 1.0-rc3 of Gradle.

         task testJar(type: Jar, dependsOn: testClasses) {
           baseName = "test-${project.archivesBaseName}"
    
           // in the latest version of Gradle 1.0-rc3
           // sourceSets.test.classes no longer works
           // It has been replaced with 
           // sourceSets.test.output
    
           from sourceSets.test.output
         }
    

提交回复
热议问题