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

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