Skip to content

Commit

Permalink
build: publish sources and javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Nov 14, 2019
1 parent c4a15af commit c09c25a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
17 changes: 0 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,7 @@ allprojects {
if(project.name != 'integration-tests') {
apply from: "$rootDir/gradle/publish.gradle"

task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}

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

task testJar(type: Jar) {
archiveClassifier = 'tests'
from sourceSets.test.output
}

javadoc { options.encoding = 'UTF-8' }

artifacts { archives sourcesJar, javadocJar, testJar }
}
}

Expand Down
23 changes: 23 additions & 0 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,32 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "de.marcphilipp.nexus-publish"

task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}

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

task testJar(type: Jar) {
archiveClassifier = 'tests'
from sourceSets.test.output
}

javadoc { options.encoding = 'UTF-8' }

artifacts { archives sourcesJar, javadocJar, testJar }

publishing {
publications {
maven(MavenPublication) {
artifact sourcesJar
artifact javadocJar
artifact testJar

pom {
name = 'web3j'
description.set( project.provider( { project.description } ) )
Expand Down

0 comments on commit c09c25a

Please sign in to comment.