Skip to content

Commit

Permalink
Further adjustments to remove traces of Java 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnmcmanus committed Sep 18, 2024
1 parent c45fa90 commit f3a27cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Maven:

### Requirements
#### Minimum Java version
- Gson 2.9.0 and newer: Java 7
- Gson 2.12.0 and newer: Java 8
- Gson 2.9.0 to 2.11.0: Java 7
- Gson 2.8.9 and older: Java 6

Despite supporting older Java versions, Gson also provides a JPMS module descriptor (module name `com.google.gson`) for users of Java 9 or newer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class JavaVersionTest {

@Test
public void testGetMajorJavaVersion() {
// Gson currently requires at least Java 7
assertThat(JavaVersion.getMajorJavaVersion()).isAtLeast(7);
// Gson currently requires at least Java 8
assertThat(JavaVersion.getMajorJavaVersion()).isAtLeast(8);
}

@Test
Expand Down
14 changes: 0 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -556,20 +556,6 @@
</build>
</profile>

<!-- Slightly adjust build to support building with JDK >= 21
However, by default this will intentionally be blocked by the Maven Enforcer Plugin defined above
and must be explicitly circumvented to avoid building non-release Gson artifacts by accident -->
<profile>
<id>jdk21+</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<!-- JDK 21 does not support Java 7 as release, must use at least Java 8 -->
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>

<!-- Profile defining additional plugins to be executed for release -->
<profile>
<id>release</id>
Expand Down

0 comments on commit f3a27cd

Please sign in to comment.