androidTest is built with the tested app on its classpath. So it has access
to all of its classes.

On Mon, Apr 13, 2015 at 11:48 PM, Lasse Magnussen <[email protected]>
wrote:

> Hi all,
>
> I have this project which has several build types, debug, dev, debugprod,
> release, alpha, beta and androidTest.
> Now I've run into a little problem when doing tests via androidTest.
>
> I'm using Dagger for dependecy injection and I wanted to create a
> Modules.java for each build type that described the
> various modules to be used for my graphs.
>
> This works well for all build types except androidTest which pulls in both
> androidTest AND debug.
>
> sourceSets {
>     debug {
>         java.srcDirs = ['src/main/src-variations/debug']
>     }
>     dev {
>         java.srcDirs = ['src/main/src-variations/debug']
>     }
>     debugprod {
>         java.srcDirs = ['src/main/src-variations/prod']
>     }
>     release {
>         java.srcDirs = ['src/main/src-variations/prod']
>         assets.srcDirs = ['src/main/assets-release']
>     }
>     alpha {
>         java.srcDirs = ['src/main/src-variations/prod']
>         assets.srcDirs = ['src/main/assets-release']
>     }
>     beta {
>         java.srcDirs = ['src/main/src-variations/prod']
>         assets.srcDirs = ['src/main/assets-release']
>     }
>     androidTest {
>         java.srcDirs = ['src/main/src-variations/androidTest']
>     }
> }
>
>
>
> I'm guessing this is no accident, but I it feels inconsistent and it's
> causing me grief.
>
> Anyone had similar problems and care to share their experience?
>
> / Lasse
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to