2009/3/30 Igor Sereda <[email protected]>
>
> Hello to the list.
>
> I'm trying to set up a Gradle build instead of overly complex Ant build. So
> far it looks promising, so thanks and kudos to Hans and guys!
Thanks!
>
>
> The first bump for me is that, from what I see, test classes in one project
> are not available in test classpath in another project within the same
> build.
>
>
> The build.gradle looks something like that:
>
> project(":A") {
> dependencies {
> testCompile ':junit:0'
> }
> }
>
> project(":B") {
> dependencies {
> compile project(':A')
> testCompile project(':A')
> testCompile ':junit:0'
> }
> }
>
> Some tests in B use fixtures and stuff defined in test sources in A. The
> classpath used to compile B tests includes main classes from A but not test
> classes.
>
> Am I missing something here?
I don't think so, it is just not done automatically at the moment, but I
think it is a good idea to make this possible. I wouldn't make it the
default but make it so that when you declare a dependency on project A in B
in the testCompile dependency configuration you are depending on the test
configuration of project A.
> If that's on purpose, is there a workaround?
>
Yes there is a workaround, you can add the build/test-classes directory of
project A to the unmanagedClasspath attribute of the test task in the
project B build file.
>
>
> Kind regards,
> Igor
> --
> View this message in context:
> http://www.nabble.com/Test-classes-dependency-in-multi-project-builds-tp22787955p22787955.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
>
>
>