Skip to content

Commit d9ba720

Browse files
authored
Update to Gradle 9.1.0 (#295)
* Update to Gradle 9.1.0 This is to be consistent with the exercism/java-test-runner#171 which updated the test runner to use Gradle 9.1.0. * Update shadow Gradle plugin Updating the shadow Gradle plugin to work with Gradle 9.0. See https://github.com/GradleUp/shadow for Gradle compatibility. * Update mainClassName property This is required to work with Gradle 9. The mainClassName property was deprecated back in Gradle 8. See https://docs.gradle.org/current/userguide/upgrading_version_7.html#javaapplication_api_cleanup * Add JUnit platform launcher This is required to work with Gradle 9. The automatic loading of test framework implementation was removed back in Gradle 8, so it now has to be specified as a test runtime dependency. See also https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
1 parent 4fb2d83 commit d9ba720

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 --chown=gradle:gradle . /app

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ 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
id "ru.vyarus.mkdocs-build" version '4.0.1'
77
}
88

99
group = "org.exercism"
1010
version = "1.0-SNAPSHOT"
11-
mainClassName = "analyzer.AnalyzerCli"
11+
12+
application {
13+
mainClass = "analyzer.AnalyzerCli"
14+
}
1215

1316
repositories {
1417
mavenCentral()
@@ -22,6 +25,8 @@ dependencies {
2225
testImplementation "org.junit.jupiter:junit-jupiter"
2326
testImplementation "org.assertj:assertj-core:3.27.4"
2427
testImplementation "com.approvaltests:approvaltests:25.4.3"
28+
29+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
2530
}
2631

2732
shadowJar {

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)