We have a test application that references a library project using 
androidTestCompile.  The applications build.gradle looks like this:

dependencies{
   androidTestCompile project(":B")
}

When running the connectedAndroidTest task using the android gradle plugin 
2.2.0 the resources were included in the android test apk.  I decompiled 
the apk using apktool to verify this.  But after updating to 2.3.0 those 
resources are no longer added to the apk and the tests do not compile 
because we are using a resource that exists in project B.  As a workaround 
I included this in the build.gradle:

android{
   sourceSets{
       androidTest{
           res.srcDirs += new File(rootProject.projectDir, 
"<path-to-project-B>/src/main/res")
       }
   }
}

Which seems to add the resources to the test apk properly.  Is this 
expected behavior and is this the correct workaround or is this a bug that 
needs to be fixed in 2.3.0?  Any help would be appreciated, thanks.  

Android gradle plugin version: 2.3.0
Gradle version: 3.4.1

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