From e24470cca973c042e2e90a0b99b22bc540460429 Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Fri, 30 May 2025 10:09:31 +0200 Subject: [PATCH] chore: using splitted convention plugins --- build.gradle | 29 ++++--------------- gradle.properties | 1 + settings.gradle | 14 +++++++++ .../test/ConfigurationValidationTest.java | 2 +- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index 3b6bb0d..8950c47 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,12 @@ -buildscript { - repositories { - gradlePluginPortal() - mavenCentral() - mavenLocal() - } - dependencies { - classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.+" - classpath "org.wiremock.tools.gradle:gradle-wiremock-extension-plugins:0.4.0" - } +plugins { + id "se.bjurr.gradle.java-convention" + id "org.wiremock.tools.gradle.publishing" + id "org.wiremock.tools.gradle.java" + id "project-report" } -apply plugin: "project-report" -apply plugin: "se.bjurr.gradle.java-convention" - -// Or else it will be 11 in wiremock-extension-convention sourceCompatibility = 17 targetCompatibility = 17 -apply plugin: "org.wiremock.tools.gradle.wiremock-extension-convention" - group 'org.wiremock.integrations' @@ -41,7 +30,6 @@ configurations { dependencies { implementation platform("org.eclipse.jetty:jetty-bom:12.0.15") api "org.wiremock:wiremock-jetty12:${wiremockVersion}" - api "org.springframework.boot:spring-boot-test:3.4.1" api "org.springframework:spring-test:6.1.13" api "org.slf4j:slf4j-api:2.0.16" @@ -68,10 +56,3 @@ dependencies { } } } - -// Not using shadowJar, but currently not possible to disable in wiremock-extension-convention -shadowJar { - mergeServiceFiles() - - exclude '**/*' -} diff --git a/gradle.properties b/gradle.properties index f005138..99bea88 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,3 +8,4 @@ githubRepo=wiremock-spring-boot developer.id=tomasbjerre developer.name=Tomas Bjerre developer.email=tomas.bjerre85@gmail.com +useShadowJar=false \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 356822e..b842a95 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,15 @@ +pluginManagement { + repositories { + mavenLocal() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "se.bjurr.gradle.java-convention" version "0.+" apply false + id "org.wiremock.tools.gradle.publishing" version "latest-SNAPSHOT" apply false + id "org.wiremock.tools.gradle.java" version "latest-SNAPSHOT" apply false +} + rootProject.name = 'wiremock-spring-boot' diff --git a/src/test/java/test/ConfigurationValidationTest.java b/src/test/java/test/ConfigurationValidationTest.java index defcec6..3c9e485 100644 --- a/src/test/java/test/ConfigurationValidationTest.java +++ b/src/test/java/test/ConfigurationValidationTest.java @@ -1,7 +1,7 @@ package test; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; import org.springframework.test.context.ContextCustomizer;