2

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.

Community
  • 1
  • 1
devanshu_kaushik
  • 929
  • 11
  • 30
  • so are you just trying to put the DEX file(s) into a jar by itself? And you want this to be a part of your build or the only output? And in your question you mention source code, so .java files too? – Jim Jan 01 '16 at 00:04

0 Answers0