build.gradle.kts: use withSourcesJar() and withJavadocJar()

this adds resources to sources.jar
This commit is contained in:
Karl Tauber
2020-05-09 01:28:05 +02:00
parent 9efab8b892
commit d79a31cc79
5 changed files with 27 additions and 106 deletions

View File

@@ -26,14 +26,12 @@ dependencies {
implementation( "org.swinglabs.swingx:swingx-all:1.6.5-1" )
}
tasks {
assemble {
dependsOn(
"sourcesJar",
"javadocJar"
)
}
java {
withSourcesJar()
withJavadocJar()
}
tasks {
javadoc {
options {
this as StandardJavadocDocletOptions
@@ -41,18 +39,6 @@ tasks {
}
isFailOnError = false
}
register( "sourcesJar", Jar::class ) {
archiveClassifier.set( "sources" )
from( sourceSets.main.get().allJava )
}
register( "javadocJar", Jar::class ) {
archiveClassifier.set( "javadoc" )
from( javadoc )
}
}
publishing {
@@ -63,9 +49,6 @@ publishing {
from( components["java"] )
artifact( tasks["sourcesJar"] )
artifact( tasks["javadocJar"] )
pom {
name.set( "FlatLaf addon for SwingX" )
description.set( "Flat Look and Feel addon for SwingX" )