Skip to content

Commit 0a2f803

Browse files
authored
Merge pull request #33 from hsudbrock/build-and-publish
Build and publish
2 parents f850d1a + f18e56e commit 0a2f803

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

build.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
plugins {
22
kotlin("jvm") version "2.0.20"
33
id("org.jetbrains.kotlinx.kover") version "0.8.3"
4+
`maven-publish`
45
}
56

67
subprojects {
78
apply(plugin = "org.jetbrains.kotlin.jvm")
89
apply(plugin = "org.jetbrains.kotlinx.kover")
10+
apply(plugin = "maven-publish")
911

1012
group = "ai.ancf.lmos"
1113
version = "1.0-SNAPSHOT"
@@ -16,6 +18,19 @@ subprojects {
1618
testImplementation("io.mockk:mockk:1.13.13")
1719
}
1820

21+
publishing {
22+
publications {
23+
create<MavenPublication>("mavenKotlin") {
24+
from(components["java"])
25+
artifactId = project.name
26+
}
27+
}
28+
repositories {
29+
mavenLocal()
30+
}
31+
}
32+
33+
1934
tasks.test {
2035
useJUnitPlatform()
2136

kotlin-wot-binding-http/build.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
plugins {
2-
id("io.ktor.plugin") version "3.0.0"
3-
}
4-
51
dependencies {
2+
implementation(platform("io.ktor:ktor-bom:3.0.3"))
63
api(project(":kotlin-wot"))
74
implementation("org.slf4j:slf4j-api")
85
implementation("io.ktor:ktor-server-core")

kotlin-wot-binding-websocket/build.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
plugins {
2-
id("io.ktor.plugin") version "3.0.0"
3-
}
4-
51
dependencies {
2+
implementation(platform("io.ktor:ktor-bom:3.0.3"))
63
api(project(":kotlin-wot"))
74
api(project(":kotlin-wot-lmos-protocol"))
85
implementation("org.slf4j:slf4j-api")

kotlin-wot-integration-tests/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.springframework.boot.gradle.tasks.bundling.BootJar
2+
13
plugins {
24
kotlin("plugin.spring") version "1.9.10"
35
id("org.springframework.boot") version "3.1.5" // Use the latest compatible version
@@ -18,4 +20,8 @@ dependencies {
1820
testImplementation("org.springframework.boot:spring-boot-starter-test")
1921
testImplementation("com.hivemq:hivemq-mqtt-client:1.3.3")
2022
implementation("org.testcontainers:testcontainers:1.20.3")
21-
}
23+
}
24+
25+
tasks.withType<BootJar> {
26+
mainClass.set("integration.AgentApplication")
27+
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
plugins {
2-
id("io.ktor.plugin") version "3.0.0"
3-
}
4-
51
dependencies {
2+
implementation(platform("io.ktor:ktor-bom:3.0.3"))
63
implementation("io.ktor:ktor-serialization-jackson")
74
}

kotlin-wot-spring-boot-starter/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.springframework.boot.gradle.tasks.bundling.BootJar
2+
13
plugins {
24
kotlin("plugin.spring") version "1.9.10"
35
id("org.springframework.boot") version "3.1.5" // Use the latest compatible version
@@ -15,4 +17,12 @@ dependencies {
1517
testImplementation("org.springframework.boot:spring-boot-starter-test")
1618
testImplementation(project(":kotlin-wot-binding-http"))
1719
testImplementation(project(":kotlin-wot-binding-websocket"))
20+
}
21+
22+
tasks.getByName<BootJar>("bootJar") {
23+
enabled = false
24+
}
25+
26+
tasks.getByName<Jar>("jar") {
27+
enabled = true
1828
}

0 commit comments

Comments
 (0)