From 02f6715c2fc551c9cb5a1abe8914975a7572fb97 Mon Sep 17 00:00:00 2001 From: Josh Guilfoyle Date: Wed, 18 Feb 2015 13:36:26 -0800 Subject: [PATCH] Add fatjarRelease task to fix stetho.jar export Release fail. The stetho-1.0.0.jar that was released excludes commons-cli and will fail as a result. This dependency is so esoteric for an Android app that it feels appropriate to just bundle it. --- stetho/build.gradle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stetho/build.gradle b/stetho/build.gradle index 387d0b19..84335848 100644 --- a/stetho/build.gradle +++ b/stetho/build.gradle @@ -38,3 +38,18 @@ dependencies { } apply from: rootProject.file('release.gradle') + +android.libraryVariants.all { variant -> + def name = variant.name.capitalize() + task "fatjar${name}"(type: Jar, dependsOn: "jar${name}") { + classifier = 'fatjar' + from variant.javaCompile.destinationDir + from { + configurations.compile.findAll { + it.getName() == 'commons-cli-1.2.jar' + }.collect { + it.isDirectory() ? it : zipTree(it) + } + } + } +}