Skip to content

Commit c5af3b7

Browse files
authored
chore: using splitted convention plugins (#99)
1 parent 6880eab commit c5af3b7

File tree

6 files changed

+17
-27
lines changed

6 files changed

+17
-27
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
java -version
3131
javac -version
32-
./gradlew --no-daemon check -x shadowJar
32+
./gradlew --no-daemon check
3333
3434
- name: Publish Build
3535
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
id: publish_package
2828
uses: gradle/[email protected]
2929
with:
30-
arguments: -Pversion=${{ steps.new_version.outputs.new_version }} publish closeAndReleaseStagingRepository -x shadowJar -x publishStandaloneJarPublicationToGitHubPackagesRepository -x publishStandaloneJarPublicationToSonatypeRepository
30+
arguments: -Pversion=${{ steps.new_version.outputs.new_version }} publish closeAndReleaseStagingRepository -x publishStandaloneJarPublicationToGitHubPackagesRepository -x publishStandaloneJarPublicationToSonatypeRepository
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
OSSRH_USERNAME: ${{ vars.MAVEN_CENTRAL_USERNAME }}

build.gradle

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
buildscript {
2-
repositories {
3-
gradlePluginPortal()
4-
mavenCentral()
5-
mavenLocal()
6-
}
7-
dependencies {
8-
classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.+"
9-
classpath "org.wiremock.tools.gradle:gradle-wiremock-extension-plugins:0.5.1"
10-
}
1+
plugins {
2+
id "se.bjurr.gradle.java-convention" version "0.+"
3+
id "org.wiremock.tools.gradle.publishing" version "0.5.1"
4+
id "org.wiremock.tools.gradle.java" version "0.5.1"
5+
id "project-report"
116
}
127

13-
apply plugin: "project-report"
14-
apply plugin: "se.bjurr.gradle.java-convention"
15-
16-
// Or else it will be 11 in wiremock-extension-convention
178
sourceCompatibility = 17
189
targetCompatibility = 17
19-
apply plugin: "org.wiremock.tools.gradle.wiremock-extension-convention"
20-
2110

2211
group 'org.wiremock.integrations'
2312

@@ -41,7 +30,6 @@ configurations {
4130
dependencies {
4231
implementation platform("org.eclipse.jetty:jetty-bom:12.0.15")
4332
api "org.wiremock:wiremock-jetty12:${wiremockVersion}"
44-
4533
api "org.springframework.boot:spring-boot-test:3.4.1"
4634
api "org.springframework:spring-test:6.1.13"
4735
api "org.slf4j:slf4j-api:2.0.16"
@@ -68,10 +56,3 @@ dependencies {
6856
}
6957
}
7058
}
71-
72-
// Not using shadowJar, but currently not possible to disable in wiremock-extension-convention
73-
shadowJar {
74-
mergeServiceFiles()
75-
76-
exclude '**/*'
77-
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ githubRepo=wiremock-spring-boot
88
developer.id=tomasbjerre
99
developer.name=Tomas Bjerre
1010
developer.email=[email protected]
11+
useShadowJar=false

settings.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
pluginManagement {
2+
repositories {
3+
mavenLocal()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
19
rootProject.name = 'wiremock-spring-boot'

src/test/java/test/ConfigurationValidationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package test;
22

33
import static org.assertj.core.api.Assertions.assertThat;
4-
import static org.junit.Assert.assertThrows;
4+
import static org.junit.jupiter.api.Assertions.assertThrows;
55

66
import org.junit.jupiter.api.Test;
77
import org.springframework.test.context.ContextCustomizer;

0 commit comments

Comments
 (0)