Add configuration for test dependencies between subprojects
							parent
							
								
									d3c8e150bd
								
							
						
					
					
						commit
						8200f08da0
					
				|  | @ -57,6 +57,21 @@ dependencies { | |||
| 
 | ||||
| /*==== You probably don't have to edit below this line =======*/ | ||||
| 
 | ||||
| // Setup test configuration that can appear as a dependency in | ||||
| // other subprojects | ||||
| configurations { | ||||
|     testOutput.extendsFrom (testCompile) | ||||
| } | ||||
| 
 | ||||
| task testJar(type: Jar, dependsOn: testClasses) { | ||||
|     classifier = 'tests' | ||||
|     from sourceSets.test.output | ||||
| } | ||||
| 
 | ||||
| artifacts { | ||||
|     testOutput testJar | ||||
| } | ||||
| 
 | ||||
| // The run task added by the application plugin | ||||
| // is also of type JavaExec. | ||||
| tasks.withType(JavaExec) { | ||||
|  |  | |||
|  | @ -55,6 +55,9 @@ dependencies { | |||
|     // Google protobufs | ||||
|     compile 'com.google.protobuf:protobuf-java:3.+' | ||||
| 
 | ||||
|     // Depend on test resources from meerkat-common | ||||
|     testCompile project(path: ':meerkat-common', configuration: 'testOutput') | ||||
| 
 | ||||
|     testCompile 'junit:junit:4.+' | ||||
| 
 | ||||
|     runtime 'org.codehaus.groovy:groovy:2.4.+' | ||||
|  |  | |||
|  | @ -58,6 +58,23 @@ dependencies { | |||
| /*==== You probably don't have to edit below this line =======*/ | ||||
| 
 | ||||
| 
 | ||||
| // Setup test configuration that can appear as a dependency in | ||||
| // other subprojects | ||||
| configurations { | ||||
|     testOutput.extendsFrom (testCompile) | ||||
| } | ||||
| 
 | ||||
| task testJar(type: Jar, dependsOn: testClasses) { | ||||
|     classifier = 'tests' | ||||
|     from sourceSets.test.output | ||||
| } | ||||
| 
 | ||||
| artifacts { | ||||
|     testOutput testJar | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // The run task added by the application plugin | ||||
| // is also of type JavaExec. | ||||
| tasks.withType(JavaExec) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue