From 0e5c4e3e9f78fe77fb0bed15ff8e8f03349dc665 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Tue, 10 Dec 2024 22:37:46 +0100 Subject: [PATCH] update for common plugin v0.2.0 - cleanup Mapper.kt - update build.gradle.kts to use certificate plugin - update catalog version --- build.gradle.kts | 19 +++---------------- gradle.properties | 2 +- src/main/kotlin/ltd/hlaeja/util/Mapper.kt | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index baf7ad9..5fa5881 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(hlaeja.plugins.kotlin.jvm) alias(hlaeja.plugins.kotlin.spring) + alias(hlaeja.plugins.ltd.hlaeja.plugin.certificate) alias(hlaeja.plugins.ltd.hlaeja.plugin.service) alias(hlaeja.plugins.spring.dependency.management) alias(hlaeja.plugins.springframework.boot) @@ -30,20 +31,6 @@ dependencies { group = "ltd.hlaeja" -tasks { - named("processResources") { - dependsOn("copyKeystore", "copyPublicKey") - } - register("copyKeystore") { - group = "hlaeja" - from("cert/keystore.p12") - into("${layout.buildDirectory.get()}/resources/main/cert") - onlyIf { file("cert/keystore.p12").exists() } - } - register("copyPublicKey") { - group = "hlaeja" - from("cert/public_key.pem") - into("${layout.buildDirectory.get()}/resources/main/cert") - onlyIf { file("cert/public_key.pem").exists() } - } +tasks.named("processResources") { + dependsOn("copyCertificates") } diff --git a/gradle.properties b/gradle.properties index 9c7f38a..2b93c56 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx1g version=0.2.0-SNAPSHOT -catalog=0.5.0 +catalog=0.6.0-SNAPSHOT docker.port.expose=8443 container.port.expose=8443 container.port.host=9000 diff --git a/src/main/kotlin/ltd/hlaeja/util/Mapper.kt b/src/main/kotlin/ltd/hlaeja/util/Mapper.kt index fbfce5e..d93c71e 100644 --- a/src/main/kotlin/ltd/hlaeja/util/Mapper.kt +++ b/src/main/kotlin/ltd/hlaeja/util/Mapper.kt @@ -5,6 +5,6 @@ import ltd.hlaeja.library.deviceConfiguration.Node fun Node.Response.toDeviceResponse(): Map { return mapOf( "version" to timestamp.toEpochSecond().toString(), - "data" to configuration + "data" to configuration, ) }