Compile jar with test classes
问题 How can I compile jar with test classes in android? I am using android gradle plugin 1.3.1: classpath 'com.android.tools.build:gradle:1.3.1' I've tried: task testSourcesJar(type: Jar) { from android.sourceSets.test.java.srcDirs } And it creates exactly what is defined: a jar with test sources, not with compiled classes. Where are the compiled classess and on which task I should depend on to create jar with test classes? I need it to prepare test artifact for another project, which must extend