koevet2 wrote:
>
> I have a common class (Common.java) that lives in
> projectA/src/test/one/two/three/
> This class has some helper methods used by Unit Tests located in other
> sub-projects.
> How should I go to make this class "visible" to the other sub-projects?
>
You have several options:
1. Move the class to src/main (if it's OK to ship it)
2. Create a common-test project
3. Directly add the class to the dependent projects' testCompile class path,
e.g. with "testCompile project("common").sourceSets.test.classes" (if
necessary you could restrict this further just to class Common)
In general, I suggest to go with 2.
--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradleware
http://www.gradleware.com
Creator, Spock Framework
http://spockframework.org
--
View this message in context:
http://gradle.1045684.n5.nabble.com/How-to-reference-a-common-Test-class-from-sub-projects-tp3409484p3409541.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email