Skip to content

Commit

Permalink
add javadoc/sources jars
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Jul 5, 2016
1 parent 37ce0f7 commit c312f65
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ scmVersion {
allprojects {
project.version = scmVersion.version
apply plugin: 'maven'

}
subprojects{
apply plugin: 'java'
apply from: "${rootDir}/gradle/java.gradle"
}

apply plugin: 'idea'
Expand Down
30 changes: 30 additions & 0 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// produce a jar file for our test classes
task testJar(type: Jar) {
classifier = 'tests'
from sourceSets.test.java
}

// produce a jar file for our source files
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.java
}

// produce a jar file for our javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

//add all artifacts to archives
artifacts {
archives testJar
archives sourceJar
archives javadocJar
}

0 comments on commit c312f65

Please sign in to comment.