Skip to content

Commit

Permalink
Add fatjarRelease task to fix stetho.jar export
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Josh Guilfoyle authored and longinoa committed Mar 11, 2015
1 parent aca347c commit 02f6715
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions stetho/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}

0 comments on commit 02f6715

Please sign in to comment.