I have an android gradle project and java gradle project as its dependency. The second one have separated unit test classes. It contains also resources placed in src/main/resources
.
Problem is that resources are not being copied to test build directory.
I've found that topic: http://forums.gradle.org/gradle/topics/resources_from_src_main_resources_not_included_for_test and adding the snippet from one before last post causes that resources are added and tests are working fine but building android APK fails due to duplicate classes. Can sourceSets be altered conditionally (only for test) or maybe there is a better way to include resources in tests?
This is mentioned snippet:
sourceSets {
main {
output.resourcesDir = "build/classes/main"
}
}