I'm using Android Studio with LibGDX and I'm trying to create a gradle task to export android project as a jar. I have added the following code to default build.gradle file under android project folder:
task exportMyLib(type: Jar){
from android.sourceSets.main.java.srcDirs
}
That orks fine to export source files. But I need to export compiled classes also - how can I do that?