From a07877810be9871ea86defef3ffc73039f965ab2 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Thu, 18 Apr 2024 16:38:36 +0200 Subject: [PATCH 1/8] build > use = instead of .set() --- build.gradle.kts | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 028eaa2f8..8cac76ebb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,46 +27,46 @@ group = "com.hivemq" description = "HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5" metadata { - readableName.set("HiveMQ Community Edition") + readableName = "HiveMQ Community Edition" organization { - name.set("HiveMQ GmbH") - url.set("https://www.hivemq.com/") + name = "HiveMQ GmbH" + url = "https://www.hivemq.com/" } license { apache2() } developers { register("cschaebe") { - fullName.set("Christoph Schaebel") - email.set("christoph.schaebel@hivemq.com") + fullName = "Christoph Schaebel" + email = "christoph.schaebel@hivemq.com" } register("lbrandl") { - fullName.set("Lukas Brandl") - email.set("lukas.brandl@hivemq.com") + fullName = "Lukas Brandl" + email = "lukas.brandl@hivemq.com" } register("flimpoeck") { - fullName.set("Florian Limpoeck") - email.set("florian.limpoeck@hivemq.com") + fullName = "Florian Limpoeck" + email = "florian.limpoeck@hivemq.com" } register("sauroter") { - fullName.set("Georg Held") - email.set("georg.held@hivemq.com") + fullName = "Georg Held" + email = "georg.held@hivemq.com" } register("SgtSilvio") { - fullName.set("Silvio Giebl") - email.set("silvio.giebl@hivemq.com") + fullName = "Silvio Giebl" + email = "silvio.giebl@hivemq.com" } } github { - org.set("hivemq") - repo.set("hivemq-community-edition") + org = "hivemq" + repo = "hivemq-community-edition" issues() } } java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion = JavaLanguageVersion.of(11) } withJavadocJar() withSourcesJar() @@ -213,7 +213,7 @@ val hivemqZip by tasks.registering(Zip::class) { val name = "hivemq-ce-${project.version}" - archiveFileName.set("$name.zip") + archiveFileName = "$name.zip" from("src/distribution") { exclude("**/.gitkeep") } from("src/main/resources/config.xml") { into("conf") } @@ -229,13 +229,13 @@ oci { } } imageDefinitions.register("main") { - imageName.set("hivemq/hivemq-ce") + imageName = "hivemq/hivemq-ce" allPlatforms { parentImages { add("library:eclipse-temurin:sha256!a56ee1f79cf57b2b31152cd471a4c85b6deb3057e4a1fbe8e50b57e7d2a1d7c9") // 21.0.2_13-jre-jammy } config { - creationTime.set(Instant.EPOCH) + creationTime = Instant.EPOCH user = "10000" ports = setOf("1883", "8000") environment = mapOf( @@ -251,7 +251,7 @@ oci { } layers { layer("hivemq") { - metadata { creationTime.set(Instant.EPOCH) } + metadata { creationTime = Instant.EPOCH } contents { into("opt") { filePermissions = 0b110_100_000 @@ -338,9 +338,9 @@ downloadLicenses { tasks.updateThirdPartyLicenses { dependsOn(tasks.downloadLicenses) - projectName.set("HiveMQ") - dependencyLicense.set(tasks.downloadLicenses.get().xmlDestination.resolve("dependency-license.xml")) - outputDirectory.set(layout.projectDirectory.dir("src/distribution/third-party-licenses")) + projectName = "HiveMQ" + dependencyLicense = tasks.downloadLicenses.get().xmlDestination.resolve("dependency-license.xml") + outputDirectory = layout.projectDirectory.dir("src/distribution/third-party-licenses") } /* ******************** publishing ******************** */ From d211e586290ede87123193ba3b3cb4381a42d74d Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sun, 28 Apr 2024 10:46:47 +0200 Subject: [PATCH 2/8] Cleanup renovate.json5 --- renovate.json5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index 4c93eea62..5cfda987b 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,12 +1,12 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "local>hivemq/renovate-config:default.json5" + $schema: "https://docs.renovatebot.com/renovate-schema.json", + extends: [ + "local>hivemq/renovate-config:default.json5", ], baseBranches: [ "master", - "renovate-playground" + "renovate-playground", ], - "useBaseBranchConfig": "merge", - "branchPrefix": "renovate/hivemq-community-edition/" + useBaseBranchConfig: "merge", + branchPrefix: "renovate/hivemq-community-edition/", } From 1af310fccf8db1d6757fc5b568ff929ae5c5c739 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 22 May 2024 18:22:26 +0200 Subject: [PATCH 3/8] Remove creation times from container image --- build.gradle.kts | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8cac76ebb..290a69954 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent -import java.time.Instant plugins { java @@ -235,7 +234,6 @@ oci { add("library:eclipse-temurin:sha256!a56ee1f79cf57b2b31152cd471a4c85b6deb3057e4a1fbe8e50b57e7d2a1d7c9") // 21.0.2_13-jre-jammy } config { - creationTime = Instant.EPOCH user = "10000" ports = setOf("1883", "8000") environment = mapOf( @@ -251,7 +249,6 @@ oci { } layers { layer("hivemq") { - metadata { creationTime = Instant.EPOCH } contents { into("opt") { filePermissions = 0b110_100_000 From 2127661f5b5b9e0a939736874445621915e459f6 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 22 May 2024 18:25:10 +0200 Subject: [PATCH 4/8] Update metadata plugin to 0.6.0 --- build.gradle.kts | 2 -- gradle/libs.versions.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 290a69954..0b3d7156f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -57,8 +57,6 @@ metadata { } } github { - org = "hivemq" - repo = "hivemq-community-edition" issues() } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 814fcb822..5f357532f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -84,7 +84,7 @@ forbiddenApis = { id = "de.thetaphi.forbiddenapis", version = "3.7" } githubRelease = { id = "com.github.breadmoirai.github-release", version = "2.4.1" } javadocLinks = { id = "io.github.sgtsilvio.gradle.javadoc-links", version = "0.8.0" } license = { id = "com.github.hierynomus.license", version = "0.16.1" } -metadata = { id = "io.github.sgtsilvio.gradle.metadata", version = "0.5.0" } +metadata = { id = "io.github.sgtsilvio.gradle.metadata", version = "0.6.0" } nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" } oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.9.0" } shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } From d6530a8b11fd955144e9d339e85189981d611620 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 22 May 2024 18:25:24 +0200 Subject: [PATCH 5/8] Update eclipse-temurin digest --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0b3d7156f..cdca4c1cb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -229,7 +229,7 @@ oci { imageName = "hivemq/hivemq-ce" allPlatforms { parentImages { - add("library:eclipse-temurin:sha256!a56ee1f79cf57b2b31152cd471a4c85b6deb3057e4a1fbe8e50b57e7d2a1d7c9") // 21.0.2_13-jre-jammy + add("library:eclipse-temurin:sha256!0f8bc645fb0c9ab40c913602c9f5f12c32d9ae6bef3e34fa0469c98e7341333c") // 21.0.3_9-jre-jammy } config { user = "10000" From dcb22aea5b4a9b64db52e97a8a878ecccb4ef936 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 22 May 2024 18:26:40 +0200 Subject: [PATCH 6/8] Cleanup permissions of opt/docker-emtrypoint.sh in container image --- build.gradle.kts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index cdca4c1cb..2bd63cfe2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -249,12 +249,12 @@ oci { layer("hivemq") { contents { into("opt") { - filePermissions = 0b110_100_000 - directoryPermissions = 0b111_101_000 + from("docker/docker-entrypoint.sh") { filePermissions = 0b111_101_101 } permissions("hivemq/", 0b111_111_000) - permissions("**/*.sh", 0b111_101_000) - from("docker/docker-entrypoint.sh") into("hivemq") { + filePermissions = 0b110_100_000 + directoryPermissions = 0b111_101_000 + permissions("**/*.sh", 0b111_101_000) permissions("conf/", 0b111_111_000) permissions("conf/config.xml", 0b110_110_000) permissions("conf/logback.xml", 0b110_110_000) From 24b03a3fa39cbfdbd5d857894fc0812137b9ec26 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 5 Jun 2024 15:24:23 +0200 Subject: [PATCH 7/8] Update gradle-oci to 0.10.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5f357532f..a56159296 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -86,6 +86,6 @@ javadocLinks = { id = "io.github.sgtsilvio.gradle.javadoc-links", version = "0.8 license = { id = "com.github.hierynomus.license", version = "0.16.1" } metadata = { id = "io.github.sgtsilvio.gradle.metadata", version = "0.6.0" } nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" } -oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.9.0" } +oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.10.0" } shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } versions = { id = "com.github.ben-manes.versions", version = "0.51.0" } From 18ffad5d61c2bc3db84f44b8ecb6fd5ebe9d5559 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 5 Jun 2024 16:00:40 +0200 Subject: [PATCH 8/8] Update eclipse-temurin digest --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2bd63cfe2..5fa7f664e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -229,7 +229,7 @@ oci { imageName = "hivemq/hivemq-ce" allPlatforms { parentImages { - add("library:eclipse-temurin:sha256!0f8bc645fb0c9ab40c913602c9f5f12c32d9ae6bef3e34fa0469c98e7341333c") // 21.0.3_9-jre-jammy + add("library:eclipse-temurin:sha256!78a82edcacc6cef9fd8c8a276fbd5e08f72fcdfbaf9d28df8b2d9207a7450cb6") // 21.0.3_9-jre-jammy } config { user = "10000"