Skip to content

Commit c9bcf9c

Browse files
committed
Update junit version & extract versions as variables in gradle
1 parent 7a8829c commit c9bcf9c

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

build.gradle

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ plugins {
22
id 'java'
33
id 'signing'
44
id 'maven-publish'
5-
id('io.github.gradle-nexus.publish-plugin') version '1.1.0'
6-
id("com.github.johnrengelman.shadow") version "7.1.2"
5+
id 'io.github.gradle-nexus.publish-plugin' version "${nexusPluginVersion}"
6+
id 'com.github.johnrengelman.shadow' version "${shadowJarPluginVersion}"
77
}
88

99
repositories {
@@ -57,17 +57,23 @@ tasks.register('integrationTest', Test) {
5757
check.dependsOn integrationTest
5858

5959
dependencies {
60-
implementation "javax.xml.bind:jaxb-api:2.3.1"
61-
implementation "com.fasterxml.jackson.core:jackson-databind:2.14.1"
62-
implementation "io.swagger.core.v3:swagger-annotations:2.0.0"
63-
implementation "org.slf4j:slf4j-api:2.0.5"
64-
implementation "com.squareup.okhttp3:okhttp:4.9.1"
65-
66-
testImplementation "org.slf4j:slf4j-simple:2.0.5"
67-
testImplementation "junit:junit:4.12"
68-
testImplementation "org.hamcrest:hamcrest-all:1.3"
69-
integrationTestImplementation "junit:junit:4.12"
70-
integrationTestImplementation "org.hamcrest:hamcrest-all:1.3"
60+
implementation "javax.xml.bind:jaxb-api:${javaxXmlBindVersion}"
61+
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonCoreVersion}"
62+
implementation "io.swagger.core.v3:swagger-annotations:${swaggerCoreV3Version}"
63+
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
64+
implementation "com.squareup.okhttp3:okhttp:${okhttp3Version}"
65+
66+
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
67+
testImplementation "org.hamcrest:hamcrest-all:${hamcrestVersion}"
68+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
69+
70+
integrationTestImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
71+
integrationTestImplementation "org.hamcrest:hamcrest-all:${hamcrestVersion}"
72+
integrationTestRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
73+
}
74+
75+
tasks.withType(Test).configureEach {
76+
useJUnitPlatform()
7177
}
7278

7379
nexusPublishing {

gradle.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Plugin versions
2+
nexusPluginVersion=1.1.0
3+
shadowJarPluginVersion=7.1.2
4+
5+
# Dependency versions
6+
hamcrestVersion=1.3
7+
jacksonCoreVersion=2.14.1
8+
javaxXmlBindVersion=2.3.1
9+
junitJupiterVersion=5.9.3
10+
okhttp3Version=4.9.1
11+
slf4jVersion=2.0.5
12+
swaggerCoreV3Version=2.0.0

0 commit comments

Comments
 (0)