Skip to content

Commit

Permalink
introduce maven-publish plugin, to publish jar files (spotbugs#97)
Browse files Browse the repository at this point in the history
this change make it possible to publish spotbugs.jar and
spot-bugs-annotations.jar, with sources and javadoc.
  • Loading branch information
KengoTODA authored and jsotuyod committed Jan 2, 2017
1 parent 131e279 commit b4ba551
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply from: "$rootDir/gradle/eclipse.gradle"
apply from: "$rootDir/gradle/idea.gradle"
apply from: "$rootDir/gradle/test.gradle"
Expand Down
31 changes: 31 additions & 0 deletions findbugs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,37 @@ task smokeTest {
}
}

// https://docs.gradle.org/current/userguide/publishing_maven.html
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId 'spotbugs'

artifact sourcesJar {
classifier 'sources'
}

artifact javadocJar {
classifier 'javadoc'
}
}

annotations(MavenPublication) {
artifactId 'spotbugs-annotations'
artifact annotationsJar

artifact annotationSourcesJar {
classifier 'sources'
}

artifact annotationJavadocJar {
classifier 'javadoc'
}
}
}
}

// TODO : jsr305.jar (really?)
// TODO : generatemanual (we should decide what to do with the manual)
// TODO : generatepdfmanual
Expand Down

0 comments on commit b4ba551

Please sign in to comment.