Skip to content

Commit 6d1c318

Browse files
committed
Drop build support for Java 1.7 and 1.8
Keep producing 1.7 artifacts, but use a more modern compiler to do so. We used to rely on source/target flags to support an earlier version of Java, but had to run 1.7 in CI to verify we didn't accidentally use newer APIs. While Java 1.7 is available in GH actions, maven doesn't quite work. With Java 9 we can use release flag instead of source/target, which also checks that we only use classes compatible with 1.7 classpath, so we don't have to run maven 1.7 in CI.
1 parent a773b23 commit 6d1c318

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
os: [ubuntu-latest]
15-
java-version: ['7', '8', '11', '13', '17']
15+
java-version: ['9', '11', '13', '17']
1616
include:
1717
- os: windows-latest
1818
java-version: '12'

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ deploy_to_sonatype:
1717
tags:
1818
- "docker-in-docker:amd64"
1919

20-
image: maven:3.9-eclipse-temurin-8
20+
image: maven:3.9-eclipse-temurin-17
2121

2222
script:
2323
# Ensure we don't print commands being run to the logs during credential

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
<configuration>
348348
<rules>
349349
<requireJavaVersion>
350-
<version>[1.7.0-0,1.9.0-0),[9.0,18.0-0)</version>
350+
<version>[9.0,18.0-0)</version>
351351
</requireJavaVersion>
352352
</rules>
353353
</configuration>
@@ -372,8 +372,7 @@
372372
<artifactId>maven-compiler-plugin</artifactId>
373373
<version>3.8.1</version>
374374
<configuration>
375-
<source>1.7</source>
376-
<target>1.7</target>
375+
<release>7</release>
377376
</configuration>
378377
</plugin>
379378
<plugin>

0 commit comments

Comments
 (0)