Skip to content

Commit 1a39263

Browse files
authored
Upgrade to Gradle 9 (#251)
This upgrades Gradle to 9.1.0 to be consistent with exercism/java-test-runner#171. This has also required the following changes: - Updating the Shadow plugin to a compatible version (see https://github.com/GradleUp/shadow). - Adding JUnit launcher as test runtime dependency, as the automatic loading of test framework implementation was removed (see https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#test_framework_implementation_dependencies). - Replacing the mainClassName property. This was deprecated back in Gradle 8 (see https://docs.gradle.org/current/userguide/upgrading_version_7.html#javaapplication_api_cleanup).
1 parent 7bb07ea commit 1a39263

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gradle:8.7-jdk21 AS build
1+
FROM gradle:9.1.0-jdk25 AS build
22

33
WORKDIR /app
44
COPY . /app

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ plugins {
22
id "java"
33
id "application"
44
id "jacoco"
5-
id "com.github.johnrengelman.shadow" version "8.1.1"
5+
id 'com.gradleup.shadow' version '9.2.2'
66
}
77

88
group = "org.exercism"
99
version = "1.0-SNAPSHOT"
10-
mainClassName = "representer.RepresenterCli"
10+
11+
application {
12+
mainClass = "representer.RepresenterCli"
13+
}
1114

1215
repositories {
1316
mavenCentral()
@@ -25,6 +28,8 @@ dependencies {
2528
testImplementation "org.junit.jupiter:junit-jupiter"
2629
testImplementation "org.assertj:assertj-core:3.25.3"
2730
testImplementation "com.approvaltests:approvaltests:25.4.3"
31+
32+
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
2833
}
2934

3035
jar {

gradle/wrapper/gradle-wrapper.jar

-9 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)