Skip to content

Commit

Permalink
Add jarDebug/Release tasks to simplify release deployment
Browse files Browse the repository at this point in the history
Releases include JAR files uploaded in the github releases system which
are clumsy to extract from the AAR files.  With this new task, it is
easier to do a release using just `gradle uploadArchives jarRelease` and
then uploading the resulting jar files (base + javadoc + sources jar)
  • Loading branch information
Josh Guilfoyle committed Feb 18, 2015
1 parent d7d8ca0 commit 4c11346
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ afterEvaluate { project ->
from android.sourceSets.main.java.srcDirs
}

android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task "jar${name}"(type: Jar) {
from variant.javaCompile.destinationDir
}
}

artifacts {
archives androidJavadocJar
archives androidSourcesJar
Expand Down
2 changes: 1 addition & 1 deletion stetho-okhttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ dependencies {
androidTestCompile 'com.squareup.okhttp:mockwebserver:2.2.0'
}

apply from: '../release.gradle'
apply from: rootProject.file('release.gradle')
2 changes: 1 addition & 1 deletion stetho-urlconnection/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies {
compile 'com.google.code.findbugs:jsr305:2.0.1'
}

apply from: '../release.gradle'
apply from: rootProject.file('release.gradle')
2 changes: 1 addition & 1 deletion stetho/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ dependencies {
androidTestCompile 'org.powermock:powermock-module-junit4:1.6.1'
}

apply from: '../release.gradle'
apply from: rootProject.file('release.gradle')

0 comments on commit 4c11346

Please sign in to comment.