1- import org.jetbrains.dokka.gradle.DokkaBasePlugin
2-
31plugins {
42 kotlin(" multiplatform" )
53 kotlin(" plugin.serialization" )
64 alias(libs.plugins.dokka)
5+ alias(libs.plugins.kover)
76 alias(libs.plugins.ktlint)
87 `maven- publish`
98 signing
10- alias(libs.plugins.kover)
119}
1210
1311dependencies {
@@ -48,49 +46,51 @@ tasks.withType<GenerateModuleMetadata> {
4846 enabled = ! isSnapshot()
4947}
5048
51- val dokkaHtmlJar by tasks.registering(Jar ::class ) {
52- group = DokkaBasePlugin . TASK_GROUP
49+ val dokkaJavadocJar by tasks.registering(Jar ::class ) {
50+ group = JavaBasePlugin . DOCUMENTATION_GROUP
5351 description = " Assembles Kotlin docs with Dokka"
54- archiveClassifier.set( " javadoc" )
52+ archiveClassifier = " javadoc"
5553 from(tasks.dokkaGeneratePublicationHtml)
5654}
5755
5856publishing {
5957 publications {
60- create<MavenPublication >(" library" ) {
61- artifactId = " kotlinx-serialization-csv"
58+ withType<MavenPublication > {
59+ artifactId = artifactId.replace(project.name, " kotlinx-serialization-csv" )
60+
61+ if (artifactId.endsWith(" -jvm" )) {
62+ artifact(dokkaJavadocJar)
63+ }
6264
6365 pom {
64- name.set( " kotlinx-serialization-csv" )
65- description.set( " Library to easily use Kotlin Serialization to serialize to/from CSV." )
66- url.set( " https://github.com/brudaswen/serialization-csv/" )
66+ name = " kotlinx-serialization-csv"
67+ description = " Library to easily use Kotlin Serialization to serialize to/from CSV."
68+ url = " https://github.com/brudaswen/serialization-csv/"
6769
6870 licenses {
6971 license {
70- name.set( " Apache License, Version 2.0" )
71- url.set( " https://www.apache.org/licenses/LICENSE-2.0.txt" )
72+ name = " Apache License, Version 2.0"
73+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
7274 }
7375 }
7476 developers {
7577 developer {
76- id.set( " brudaswen" )
77- name.set( " Sven Obser" )
78- 78+ id = " brudaswen"
79+ name = " Sven Obser"
80+ 7981 }
8082 }
8183 scm {
82- connection.set(" scm:git:git://github.com/brudaswen/kotlinx-serialization-csv.git" )
83- developerConnection.set(
" scm:git:ssh://[email protected] :brudaswen/kotlinx-serialization-csv.git" )
84- url.set(" https://github.com/brudaswen/kotlinx-serialization-csv/" )
84+ connection = " scm:git:git://github.com/brudaswen/kotlinx-serialization-csv.git"
85+ developerConnection =
86+ " scm:git:ssh://[email protected] :brudaswen/kotlinx-serialization-csv.git" 87+ url = " https://github.com/brudaswen/kotlinx-serialization-csv/"
8588 }
8689 issueManagement {
87- system.set( " GitHub Issues" )
88- url.set( " https://github.com/brudaswen/kotlinx-serialization-csv/issues/" )
90+ system = " GitHub Issues"
91+ url = " https://github.com/brudaswen/kotlinx-serialization-csv/issues/"
8992 }
9093 }
91-
92- from(components[" kotlin" ])
93- artifact(dokkaHtmlJar)
9494 }
9595 }
9696}
@@ -102,7 +102,7 @@ signing {
102102 val signingPassword: String? by project
103103 useInMemoryPgpKeys(signingKey, signingPassword)
104104
105- sign(publishing.publications[ " library " ] )
105+ sign(publishing.publications)
106106}
107107
108108kover {
0 commit comments