Different flavors of this question have been asked and I would like to state for starters that none of them solve my particular use-case.
I know this is not particularly straightforward in Android Studio, but here's what I need:
I want a (gradle?) task in Android Studio to build a .jar which contains only the compiled .class files from my source code along with the .class files from the dependencies I define in my build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.*'])
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.brightcove.player:android-sdk:4.+'
compile 'com.android.support:support-v4:23.1.1'
}
I do not need it to contain other files like the manifest or anything else in the configurations.compile directory. Basically, it needs to contain all the classes that would be found in the classes.dex of the decompiled .apk file.