Classes belonging to the dependency "androidTestCompile 
project(:exampleAarLib)" are not found when androidTest classes are 
compiled. androidTest classes are only able to access dependency classes 
when the dependency is declared as "compile project(:exampleAarLib)".

This is a critical issue because it forces us to move our tests into 
separate test-only library projects. That is the only way we can use 
"compile project(:exampleAarLib)" without affecting debug and release 
builds. You may be able to use the "provided" + "androidTestCompile" hack, 
but I don't have that option because our test libraries depend back onto 
the library under test in order to provide test fixtures. Declaring both 
"provided" and "androidTestCompile" results in a circular dependency and a 
broken build.

I'd appreciate it if anyone on the tools team could at least point me in 
the right direction. Hoping I'll have some time this weekend to dig into 
the source again. Mahalo.

On Friday, March 7, 2014 2:00:38 PM UTC-10, Nicolas Milliard wrote:
>
> Hello,
>
> I am having an issue using androidTestCompile with AAR dependencies (Jar 
> deps are working) using:
> * Gradle 1.11 
> * Gradle Android Tool plugin 0.9.0
>
> How to reproduce
> ->   Use any AAR dependency with the '"androidTestCompile" scope , like 
> androidTestCompile  'com.jakewharton.espresso:espresso:1.1-r2'
>
> Actual result
> -> The java classes are not accessible from the android test source code
>
> When did this bug start happening?
> -> I noticed it starting from 0.9.0, might have been present sooner though.
>
> When does the bug occur?
> -> Always
>
> Describe any workarounds you have found
> -> Change the scope to "compile" solves it but not an appropriate solution
>

-- 
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