Skip to content

Commit 563c639

Browse files
committed
Update workflow and build to Java 17
1 parent 8f5da0d commit 563c639

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: 'Set up JDK'
1717
uses: actions/setup-java@v5
1818
with:
19-
java-version: 8
19+
java-version: 17
2020
distribution: temurin
2121
- name: Init Gradle Build Action
2222
uses: gradle/actions/setup-gradle@v5
@@ -38,7 +38,7 @@ jobs:
3838
- name: 'Set up JDK'
3939
uses: actions/setup-java@v5
4040
with:
41-
java-version: 8
41+
java-version: 17
4242
distribution: temurin
4343
- name: 'Check Spock'
4444
run: |
@@ -57,7 +57,7 @@ jobs:
5757
- name: 'Set up JDK'
5858
uses: actions/setup-java@v5
5959
with:
60-
java-version: 8
60+
java-version: 17
6161
distribution: temurin
6262
- name: 'Check Spock'
6363
run: |

README.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ All builds (Gradle and Maven) will automatically download all required dependenc
1414

1515
=== Prerequisites
1616

17-
- JDK 8 or higher
17+
- JDK 17 or higher
1818
- Maven use `mvnw` wrapper
1919
- Gradle use `gradlew` wrapper
2020

2121
NOTE: This example shows the usage of Spock 2.0, which uses the JUnit Platform. If you want to see how to get Spock 1.x with JUnit 4 up and running see the https://github.com/spockframework/spock-example/tree/spock-1.x[Spock-1.x] Branch.
2222

23+
NOTE: Spock supports Java 8, but Groovy 5.0 requires Java 11+ and Gradle 9+ requires Java 17+.
24+
So for simplicity’s sake the example uses Java 17.
25+
If you want to use an older Java version, please use an older Gradle version (e.g. Gradle 8.x for Java 8+).
26+
Check the https://github.com/spockframework/spock-example/tree/java-8[Java-8] Branch for the last state of the example with Java 8.
27+
2328
=== Building with Gradle
2429
Type:
2530

@@ -61,4 +66,3 @@ If you have any comments or questions, please direct them to the Spock discussio
6166
Happy spec'ing!
6267

6368
The Spock Framework Team
64-

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description = "Spock Framework - Example Project"
88
// Spock works with Java 1.8 and above
99
java {
1010
toolchain {
11-
languageVersion.set(JavaLanguageVersion.of(8))
11+
languageVersion.set(JavaLanguageVersion.of(17))
1212
}
1313
}
1414

0 commit comments

Comments
 (0)