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

@@ -38,14 +38,12 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
}
}
tasks {
assemble {
dependsOn(
"sourcesJar",
"javadocJar"
)
}
java {
withSourcesJar()
withJavadocJar()
}
tasks {
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
named<JavaCompile>( "compileModuleInfoJava" ) {
sourceCompatibility = "9"
@@ -82,18 +80,12 @@ tasks {
isFailOnError = false
}
register( "sourcesJar", Jar::class ) {
named<Jar>("sourcesJar" ) {
archiveBaseName.set( "flatlaf" )
archiveClassifier.set( "sources" )
from( sourceSets.main.get().allJava )
}
register( "javadocJar", Jar::class ) {
named<Jar>("javadocJar" ) {
archiveBaseName.set( "flatlaf" )
archiveClassifier.set( "javadoc" )
from( javadoc )
}
}
@@ -105,9 +97,6 @@ publishing {
from( components["java"] )
artifact( tasks["sourcesJar"] )
artifact( tasks["javadocJar"] )
pom {
name.set( "FlatLaf" )
description.set( "Flat Look and Feel" )

View File

@@ -26,14 +26,12 @@ dependencies {
implementation( "com.formdev:svgSalamander:1.1.2.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 Extras" )
description.set( "Flat Look and Feel Extras" )

View File

@@ -37,14 +37,12 @@ if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
}
}
tasks {
assemble {
dependsOn(
"sourcesJar",
"javadocJar"
)
}
java {
withSourcesJar()
withJavadocJar()
}
tasks {
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
named<JavaCompile>( "compileModuleInfoJava" ) {
sourceCompatibility = "9"
@@ -72,18 +70,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 {
@@ -94,9 +80,6 @@ publishing {
from( components["java"] )
artifact( tasks["sourcesJar"] )
artifact( tasks["javadocJar"] )
pom {
name.set( "FlatLaf IntelliJ Themes Pack" )
description.set( "Flat Look and Feel IntelliJ Themes Pack" )

View File

@@ -26,14 +26,12 @@ dependencies {
implementation( "com.jidesoft:jide-oss:3.6.18" )
}
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 JIDE Common Layer" )
description.set( "Flat Look and Feel addon for JIDE Common Layer" )

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" )