Skip to content

Commit

Permalink
Bundling of sources and javadocs from indigo-commons
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoutanov committed Jun 23, 2017
1 parent 874f93e commit aae78eb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
9 changes: 5 additions & 4 deletions assurance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ dependencies {

jar {
dependsOn ':indigo-commons:jar'
from {
configurations.compile.filter({it.name =~ /indigo-commons.jar/}).collect {
it.isDirectory() ? it : zipTree(it) }
}
from zipTree("${project(':indigo-commons').buildDir}/libs/indigo-commons.jar")
baseName packageName
finalizedBy jacocoTestReport
}
Expand Down Expand Up @@ -77,14 +74,18 @@ bintrayUpload {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
dependsOn ':indigo-commons:javadocJar'
baseName packageName
classifier = 'javadoc'
from "$buildDir/docs/javadoc"
from "${project(':indigo-commons').buildDir}/docs/javadoc"
}

task sourcesJar(type: Jar) {
dependsOn ':indigo-commons:sourcesJar'
baseName packageName
from sourceSets.main.allSource
from zipTree("${project(':indigo-commons').buildDir}/libs/indigo-commons-sources.jar")
classifier = 'sources'
}

Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ task testJar(type: Jar) {

jar {
dependsOn ':indigo-commons:jar'
from {
configurations.compile.filter({it.name =~ /indigo-commons.jar/}).collect {
it.isDirectory() ? it : zipTree(it) }
}
from zipTree("${project(':indigo-commons').buildDir}/libs/indigo-commons.jar")
baseName packageName
finalizedBy jacocoTestReport
}
Expand Down Expand Up @@ -124,14 +121,18 @@ bintrayUpload {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
dependsOn ':indigo-commons:javadocJar'
baseName packageName
classifier = 'javadoc'
from "$buildDir/docs/javadoc"
from "${project(':indigo-commons').buildDir}/docs/javadoc"
}

task sourcesJar(type: Jar) {
dependsOn ':indigo-commons:sourcesJar'
baseName packageName
from sourceSets.main.allSource
from zipTree("${project(':indigo-commons').buildDir}/libs/indigo-commons-sources.jar")
classifier = 'sources'
}

Expand Down
16 changes: 15 additions & 1 deletion commons/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apply plugin: 'java'
apply plugin: 'jacoco'

def packageName = 'indigo-commons'

repositories {
jcenter()
}
Expand All @@ -10,10 +12,22 @@ dependencies {
}

jar {
baseName 'indigo-commons'
baseName packageName
finalizedBy jacocoTestReport
}

task javadocJar(type: Jar, dependsOn: javadoc) {
baseName packageName
classifier = 'javadoc'
from "$buildDir/docs/javadoc"
}

task sourcesJar(type: Jar) {
baseName packageName
from sourceSets.main.allSource
classifier = 'sources'
}

jacoco {
toolVersion = "0.7.9"
}
Expand Down

0 comments on commit aae78eb

Please sign in to comment.