diff --git a/build.gradle.kts b/build.gradle.kts index 4d178e7..9799cbb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,6 +23,7 @@ plugins { `maven-publish` signing alias(libs.plugins.versions) + alias(libs.plugins.dokka) apply false } allprojects { @@ -35,31 +36,35 @@ subprojects { if (project.name.startsWith("xemantic")) { - tasks { - withType { - manifest { - attributes( - mapOf( - "Implementation-Title" to project.name, - "Implementation-Version" to project.version - ) - ) - } - } + apply(plugin = "maven-publish") + apply(plugin = "java-library") + apply(plugin = "org.jetbrains.dokka") + + configure { + withJavadocJar() + withSourcesJar() } -// tasks.jar { + afterEvaluate { -// } + tasks { - apply(plugin = "maven-publish") - apply(plugin = "java-library") + withType { + manifest { + attributes( + mapOf( + "Implementation-Title" to project.name, + "Implementation-Version" to project.version + ) + ) + } - afterEvaluate { + } + + named("javadocJar") { + from(named("dokkaJavadoc")) + } - configure { - withJavadocJar() - withSourcesJar() } configure { @@ -84,25 +89,40 @@ subprojects { publications { create("maven") { from(components["kotlin"]) + artifact(tasks.named("javadocJar")) pom { description = "Kotlin goodies for Java Swing" url = "https://github.com/xemantic/xemantic-kotlin-swing-dsl" + inceptionYear = "2020" + organization { + name = "Xemantic" + url = "https://xemantic.com" + } licenses { license { - name.set("GNU Lesser General Public License 3") - url.set("https://www.gnu.org/licenses/lgpl-3.0.en.html") + name = "GNU Lesser General Public License 3" + url = "https://www.gnu.org/licenses/lgpl-3.0.en.html" + distribution = "repo" } } + scm { + url = "https://github.com/xemantic/xemantic-kotlin-swing-dsl" + } + ciManagement { + system = "GitHub" + url = "https://github.com/xemantic/xemantic-kotlin-swing-dsl/actions" + } + issueManagement { + system = "GitHub" + url = "https://github.com/xemantic/xemantic-kotlin-swing-dsl/issues" + } developers { developer { - id.set("morisil") - name.set("Kazik Pogoda") - email.set("morisil@xemantic.com") + id = "morisil" + name = "Kazik Pogoda" + email = "morisil@xemantic.com" } } - scm { - url.set("https://github.com/xemantic/xemantic-kotlin-swing-dsl") - } } } } @@ -113,43 +133,6 @@ subprojects { } -//publishing { -// -// publications { -// create("mavenJava") { -// groupId = "com.xemantic.kotlin" -// //from(components["kotlin"]) -// pom { -// name.set("xemantic-kotlin-swing-dsl") -// description.set("Kotlin goodies for Java Swing") -// url.set("https://github.com/xemantic/xemantic-kotlin-swing-dsl") -// -// licenses { -// license { -// name.set("GNU Lesser General Public License 3") -// url.set("https://www.gnu.org/licenses/lgpl-3.0.en.html") -// } -// } -// developers { -// developer { -// id.set("morisil") -// name.set("Kazik Pogoda") -// email.set("morisil@xemantic.com") -// } -// } -// scm { -// url.set("https://github.com/xemantic/xemantic-kotlin-swing-dsl") -// } -// } -// } -// } -// -// -// -//} - - - //signing { // if ( // project.hasProperty("signing.keyId") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7c2b38d..4633312 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,11 @@ [versions] kotlin = "2.0.10" - kotlinxCoroutines = "1.8.1" kotest = "5.9.1" +versionsPlugin = "0.51.0" +dokka = "1.9.20" + [libraries] kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" } kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } @@ -13,4 +15,5 @@ kotest-assertions-core = { group = "io.kotest", name = "kotest-assertions-core", [plugins] kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -versions = { id = "com.github.ben-manes.versions", version = "0.51.0" } +versions = { id = "com.github.ben-manes.versions", version.ref = "versionsPlugin" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }