Skip to content

Commit 293a5a1

Browse files
committed
Added MavenPublish plugin
1 parent c4d94de commit 293a5a1

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

build.gradle.kts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
kotlin("jvm") version "2.0.20"
35
id("org.jetbrains.kotlinx.kover") version "0.8.3"
46
id("org.cadixdev.licenser") version "0.6.1"
5-
`maven-publish`
7+
id("com.vanniktech.maven.publish") version "0.31.0"
8+
id("org.cyclonedx.bom") version "2.2.0" apply false
69
}
710

811
subprojects {
912
apply(plugin = "org.jetbrains.kotlin.jvm")
1013
apply(plugin = "org.jetbrains.kotlinx.kover")
1114
apply(plugin = "maven-publish")
1215
apply(plugin = "org.cadixdev.licenser")
16+
apply(plugin = "com.vanniktech.maven.publish")
17+
apply(plugin = "org.cyclonedx.bom")
1318

1419
group = "org.eclipse.thingweb"
15-
version = "0.1.3-SNAPSHOT"
20+
version = "0.1.0-SNAPSHOT"
1621

1722
license {
1823
header(rootProject.file("LICENSE"))
@@ -46,21 +51,34 @@ subprojects {
4651
add("archives", tasks["javadocJar"])
4752
}
4853

49-
publishing {
50-
publications {
51-
create<MavenPublication>("mavenKotlin") {
52-
from(components["java"])
53-
artifact(tasks["sourcesJar"])
54-
artifact(tasks["javadocJar"])
55-
artifactId = project.name
54+
mavenPublishing {
55+
publishToMavenCentral(SonatypeHost.DEFAULT, automaticRelease = true)
56+
signAllPublications()
57+
58+
pom {
59+
name = "kotlin-wot"
60+
description = "A Framework for implementing Web of Things in Kotlin."
61+
url = "https://github.com/eclipse-thingweb/kotlin-wot"
62+
licenses {
63+
license {
64+
name = "Apache-2.0"
65+
distribution = "repo"
66+
url = "https://github.com/eclipse-thingweb/kotlin-wot/blob/master/LICENSES/Apache-2.0.txt"
67+
}
68+
}
69+
developers {
70+
developer {
71+
id = "robwin"
72+
name = "Robert Winkler"
73+
74+
}
75+
}
76+
scm {
77+
url = "https://github.com/eclipse-thingweb/kotlin-wot.git"
5678
}
57-
}
58-
repositories {
59-
mavenLocal()
6079
}
6180
}
6281

63-
6482
tasks.test {
6583
useJUnitPlatform()
6684

0 commit comments

Comments
 (0)