From f7f604433cacb0a831889f35c8dcecaf59f2a212 Mon Sep 17 00:00:00 2001 From: Ruth Bassindale Date: Mon, 29 Jul 2024 09:03:03 +0200 Subject: [PATCH 1/3] Adaptions to build and publications --- build.gradle.kts | 39 ++++++++++++++++++++++++++++----------- gradle/libs.versions.toml | 5 ++++- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a4490e2..fa4a8bd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,7 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + val javaVersion = JavaVersion.VERSION_17 +val jvmVersion = JvmTarget.JVM_17 plugins { alias(libs.plugins.kotlinJvm) @@ -12,7 +15,9 @@ val dependencyVersions = listOf( libs.annotations, libs.mockk, libs.okio, - libs.opentest4j + libs.okioJvm, + libs.opentest4j, + libs.slf4j ) val dependencyVersionsByGroup = mapOf( @@ -31,9 +36,9 @@ tasks { useJUnitPlatform() } withType { - kotlinOptions { - jvmTarget = javaVersion.toString() - freeCompilerArgs = listOf("-Xjsr305=strict") + compilerOptions { + jvmTarget.set(jvmVersion) + freeCompilerArgs.set(listOf("-Xjsr305=strict")) } } } @@ -67,8 +72,9 @@ allprojects { } gradlePlugin { - website.set("https://github.com/europace/docker-publish-gradle-plugin") - vcsUrl.set("https://github.com/europace/docker-publish-gradle-plugin") + val scmUrl = "https://github.com/europace/docker-publish-gradle-plugin" + website.set(scmUrl) + vcsUrl.set(scmUrl) plugins { create("dockerPublishPlugin") { id = "de.europace.docker-publish" @@ -79,11 +85,22 @@ gradlePlugin { } } publishing { - publications.withType(MavenPublication::class).configureEach { - pom { - url.set("https://github.com/europace/docker-publish-gradle-plugin") - scm { - url.set("https://github.com/europace/docker-publish-gradle-plugin") + publications { + register("plugin", MavenPublication::class) { + from(components["java"]) + pom { + url.set(scmUrl) + scm { + url.set(scmUrl) + } + } + } + withType(MavenPublication::class).configureEach { + pom { + url.set(scmUrl) + scm { + url.set(scmUrl) + } } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 58236d8..3722ebf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,6 +5,7 @@ kotest = "5.9.1" kotlin = "2.0.0" kotlinx = "1.8.1" mockk = "1.13.12" +okio = "3.9.0" [libraries] @@ -19,8 +20,10 @@ mockk = { module = "io.mockk:mockk", version.ref = "mockk" } annotations = { module = "org.jetbrains:annotations", version = "24.1.0" } byteBuddy = { module = "net.bytebuddy:byte-buddy", version.ref = "byteBuddy" } kotlinx = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "kotlinx" } -okio = { module = "com.squareup.okio:okio", version = "3.9.0" } +okio = { module = "com.squareup.okio:okio", version.ref = "okio" } +okioJvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" } opentest4j = { module = "org.opentest4j:opentest4j", version = "1.3.0" } +slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.12" } [bundles] kotest = ["kotest", "kotestEngine", "kotestProperty", "kotestRunner"] From 65f6491948959eb39b6bf76b5f7e77c9b10ade5a Mon Sep 17 00:00:00 2001 From: Ruth Bassindale Date: Mon, 29 Jul 2024 09:03:51 +0200 Subject: [PATCH 2/3] Adapt deprecated wrapper validation action --- .github/workflows/update-gradle-wrapper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index 8026754..20360c8 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -22,4 +22,4 @@ jobs: with: repo-token: ${{ secrets.GH_ACTION_TOKEN }} labels: dependencies - - uses: gradle/wrapper-validation-action@v3 + - uses: gradle/actions/wrapper-validation@v3 From 312c1d7d3e0921a2aebdf2824b630cc0d60388e5 Mon Sep 17 00:00:00 2001 From: Ruth Date: Mon, 29 Jul 2024 09:35:08 +0200 Subject: [PATCH 3/3] Update gradle/libs.versions.toml Co-authored-by: Nils Dammenhayn <58420767+NilsDammenhayn@users.noreply.github.com> --- 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 3722ebf..1a8d9f8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,7 +23,7 @@ kotlinx = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.re okio = { module = "com.squareup.okio:okio", version.ref = "okio" } okioJvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" } opentest4j = { module = "org.opentest4j:opentest4j", version = "1.3.0" } -slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.12" } +slf4j = { module = "org.slf4j:slf4j-api", version = "2.0.13" } [bundles] kotest = ["kotest", "kotestEngine", "kotestProperty", "kotestRunner"]