We have the not uncommon requirement of executing unit tests of our Android application which make use of assets which are only required for unit testing.
With the Eclip
I found this right for me
android{ sourceSets { androidTest { assets.srcDirs = ['src/main/assets', 'src/androidTest/assets/', 'src/debug/assets/'] java.srcDirs = ['src/main/java', 'src/androidTest/java', 'src/debug/java'] } } }