Skip to content

Commit

Permalink
dokka added to gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Aug 16, 2024
1 parent 639c70d commit 1c43ab7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 66 deletions.
111 changes: 47 additions & 64 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ plugins {
`maven-publish`
signing
alias(libs.plugins.versions)
alias(libs.plugins.dokka) apply false
}

allprojects {
Expand All @@ -35,31 +36,35 @@ subprojects {

if (project.name.startsWith("xemantic")) {

tasks {
withType<Jar> {
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<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}

// tasks.jar {
afterEvaluate {

// }
tasks {

apply(plugin = "maven-publish")
apply(plugin = "java-library")
withType<Jar> {
manifest {
attributes(
mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
)
)
}

afterEvaluate {
}

named<Jar>("javadocJar") {
from(named("dokkaJavadoc"))
}

configure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}

configure<PublishingExtension> {
Expand All @@ -84,25 +89,40 @@ subprojects {
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
artifact(tasks.named<Jar>("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")
}
}
}
}
Expand All @@ -113,43 +133,6 @@ subprojects {

}

//publishing {
//
// publications {
// create<MavenPublication>("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")
Expand Down
7 changes: 5 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
Expand All @@ -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" }

0 comments on commit 1c43ab7

Please sign in to comment.