Android plugin: jar task not including class files from ./classes/debug/

(Jennifer Schuch) #1

Trying to create a fatjar for an Android project (not a library) during the debug build process. When using the below task, the compiled classes from classes/debug are not included in the ‘fat’ jar. What am I doing incorrectly?

task jar(type: Jar) {

appendix = “fat”


from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }

(Luke Daley) #2

The Android model is more complex than this.

You’ll have to look at the model exposed by the Android plugin and find the classpath that you are interested in. That is, the classpath for the variant that you are building.

You may have more luck asking the question on Stackoverflow as the developers of the Android plugin (i.e. Google) monitor that channel.