Gradle One-Jar with Stock Android Plugin

I’m beginning to use Android Studio to build out the StackMob Android library (https://github.com/stackmob/StackMob_Android/pull/2). The project is an Android Library with a few dependencies in maven central, and I’d like to make sure that the final jar has all dependencies copied into it, so that downstream apps don’t have to include the library’s dependencies, in the same fashion that one-jar uses.

I think this problem has been solved in the Eclipse world (with some shell script magic, as far as I know), and I’m wondering if there’s a good solution to this in Gradle. I’ve tried using gradle-one-jar, but that plugin depends on the gradle java plugin, which is incompatible with the stock gradle android plugin.

Does anyone have a solution to this problem?

Thanks in advance - Aaron

Hi Aaron,

How are you declaring the dependencies that you are using? And what is the jar that they need to be merged into?