Skip to content

Commit 858b729

Browse files
authored
Merge pull request #193 from jenetics/issues/JPX-192-java_25
#192: Java 25
2 parents eb93090 + e1abab3 commit 858b729

35 files changed

+108
-183
lines changed

.github/workflows/gradle.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
name: JPX Build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
- releases/*
8-
- issues/*
9-
pull_request:
10-
branches:
11-
- master
12-
- releases/*
4+
push:
5+
branches:
6+
- master
7+
- releases/*
8+
- issues/*
9+
pull_request:
10+
branches:
11+
- master
12+
- releases/*
1313

1414
jobs:
15-
build:
16-
runs-on: ${{ matrix.os }}
17-
strategy:
18-
matrix:
19-
os: [ ubuntu-latest, macos-latest ]
20-
java-version: [ 21, 24 ]
21-
steps:
22-
- uses: actions/checkout@v2
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ ubuntu-latest, macos-latest ]
20+
java-version: [ 25 ]
21+
steps:
22+
- uses: actions/checkout@v4
2323

24-
- name: Set up JDK ${{ matrix.java-version }} on ${{ matrix.os }}
25-
uses: actions/setup-java@v2
26-
with:
27-
java-version: ${{ matrix.java-version }}
28-
distribution: 'zulu'
29-
- name: Build with Gradle
30-
run: ./gradlew build --stacktrace --info
24+
- name: Set up JDK ${{ matrix.java-version }} on ${{ matrix.os }}
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: ${{ matrix.java-version }}
28+
distribution: 'zulu'
29+
cache: 'gradle'
30+
- name: Build with Gradle
31+
run: ./gradlew build --stacktrace --info

README.md

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# JPX
22

33
![Build Status](https://github.com/jenetics/jpx/actions/workflows/gradle.yml/badge.svg)
4-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.jenetics/jpx/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jpx%22)
4+
[![Maven Central Version](https://img.shields.io/maven-central/v/io.jenetics/jpx?color=green)](https://central.sonatype.com/artifact/io.jenetics/jpx)
55
[![Javadoc](https://www.javadoc.io/badge/io.jenetics/jpx.svg)](http://www.javadoc.io/doc/io.jenetics/jpx)
66

7-
**JPX** is a Java library for creating, reading and writing [GPS](https://en.wikipedia.org/wiki/Global_Positioning_System) data in [GPX](https://en.wikipedia.org/wiki/GPS_Exchange_Format) format. It is a *full* implementation of version [1.1](http://www.topografix.com/GPX/1/1/) and version [1.0](http://www.topografix.com/gpx_manual.asp) of the GPX format. The data classes are completely immutable and allows a functional programming style. They are working also nicely with the Java [Stream](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/stream/Stream.html) API. It is also possible to convert the location information into strings which are compatible to the [ISO 6709](http://en.wikipedia.org/wiki/ISO_6709) standard.
7+
8+
**JPX** is a Java library for creating, reading and writing [GPS](https://en.wikipedia.org/wiki/Global_Positioning_System) data in [GPX](https://en.wikipedia.org/wiki/GPS_Exchange_Format) format. It is a *full* implementation of version [1.1](http://www.topografix.com/GPX/1/1/) and version [1.0](http://www.topografix.com/gpx_manual.asp) of the GPX format. The data classes are completely immutable and allows a functional programming style. They are working also nicely with the Java [Stream](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Stream.html) API. It is also possible to convert the location information into strings which are compatible to the [ISO 6709](http://en.wikipedia.org/wiki/ISO_6709) standard.
89

910
Besides the basic functionality of reading and writing GPX files, the library also allows manipulating the read GPX object in a functional way.
1011

1112

1213
## Dependencies
1314

14-
The _JPX_ library needs no external dependencies. It only needs **Java 17** to compile and run. It also runs and compiles with **Java 21** and **Java 23**.
15+
The _JPX_ library needs no external dependencies. It needs **Java 25** to compile and run.
1516

1617

1718
## Building JPX
@@ -314,7 +315,7 @@ org.acme.NonValidatingDocumentBuilder
314315

315316
The library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
316317

317-
Copyright 2016-2025 Franz Wilhelmstötter
318+
Copyright 2016-2026 Franz Wilhelmstötter
318319

319320
Licensed under the Apache License, Version 2.0 (the "License");
320321
you may not use this file except in compliance with the License.
@@ -330,7 +331,7 @@ The library is licensed under the [Apache License, Version 2.0](http://www.apach
330331

331332
## Release notes
332333

333-
### [3.2.1](https://github.com/jenetics/jpx/releases/tag/v3.2.1)
334+
### [4.0.0](https://github.com/jenetics/jpx/releases/tag/v4.0.0)
334335

335336
#### Improvements
336337

@@ -345,47 +346,4 @@ The library is licensed under the [Apache License, Version 2.0](http://www.apach
345346

346347
### [3.1.0](https://github.com/jenetics/jpx/releases/tag/v3.1.0)
347348

348-
#### Improvements
349-
350-
* [#170](https://github.com/jenetics/jpx/issues/170): GPX files with invalid version number are now readable in _LENIENT_ mode.
351-
```java
352-
final GPX gpx;
353-
try (InputStream in = new FileInputStream(resource)) {
354-
gpx = GPX.Reader.of(Mode.LENIENT).read(in);
355-
}
356-
```
357-
358-
#### Bugs
359-
360-
* [#167](https://github.com/jenetics/jpx/issues/167): Fixing a test case for Windows.
361-
362-
### [3.0.1](https://github.com/jenetics/jpx/releases/tag/v3.0.1)
363-
364-
#### Bugs
365-
366-
* [#162](https://github.com/jenetics/jpx/issues/162): Elevation serialization for values > 1000m is incompatible with deserialization.
367-
368-
### [3.0.0](https://github.com/jenetics/jpx/releases/tag/v3.0.0)
369-
370-
#### Improvements
371-
372-
* [#125](https://github.com/jenetics/jpx/issues/125): **Breaking change** - Use `Instant` instead of `ZonedDateTime` for `Point.time` property.
373-
* [#148](https://github.com/jenetics/jpx/issues/148): **Breaking change** - Update to Java17.
374-
* [#155](https://github.com/jenetics/jpx/issues/155): Improved `GPX.Reader` and `GPX.Writer` classes.
375-
* [#158](https://github.com/jenetics/jpx/issues/158): Add XML `Document` reader/writer methods.
376-
```java
377-
final GPX gpx = ...;
378-
379-
final Document doc = XMLProvider.provider()
380-
.documentBuilderFactory()
381-
.newDocumentBuilder()
382-
.newDocument();
383-
384-
// The GPX data are written to the empty `doc` object.
385-
GPX.Writer.DEFAULT.write(gpx, new DOMResult(doc));
386-
```
387-
388-
#### Bugs
389349

390-
* [#151](https://github.com/jenetics/jpx/issues/151): `Double`'s being written as exponents in GPX file.
391-
* [#152](https://github.com/jenetics/jpx/issues/152): `LocationFormatter::parse` method is not thread-safe.

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ plugins {
3535
rootProject.version = JPX.VERSION
3636

3737
tasks.named<Wrapper>("wrapper") {
38-
version = "9.0.0"
38+
version = "9.3.1"
3939
distributionType = Wrapper.DistributionType.ALL
4040
}
4141

@@ -72,8 +72,8 @@ gradle.projectsEvaluated {
7272

7373
plugins.withType<JavaPlugin> {
7474
configure<JavaPluginExtension> {
75-
sourceCompatibility = JavaVersion.VERSION_21
76-
targetCompatibility = JavaVersion.VERSION_21
75+
sourceCompatibility = JavaVersion.VERSION_25
76+
targetCompatibility = JavaVersion.VERSION_25
7777
}
7878

7979
configure<JavaPluginExtension> {
@@ -133,7 +133,7 @@ fun setupTestReporting(project: Project) {
133133
project.apply(plugin = "jacoco")
134134

135135
project.configure<JacocoPluginExtension> {
136-
toolVersion = "0.8.12"
136+
toolVersion = libs.jacoco.agent.get().version.toString()
137137
}
138138

139139
project.tasks {
@@ -170,7 +170,7 @@ fun setupJavadoc(project: Project) {
170170
doclet.charSet = "UTF-8"
171171
doclet.linkSource(true)
172172
doclet.linksOffline(
173-
"https://docs.oracle.com/en/java/javase/21/docs/api/",
173+
"https://docs.oracle.com/en/java/javase/25/docs/api/",
174174
"${project.rootDir}/buildSrc/resources/javadoc/java.se"
175175
)
176176
doclet.windowTitle = "JPX ${project.version}"

buildSrc/resources/javadoc/java.se/element-list

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module:java.base
22
java.io
33
java.lang
44
java.lang.annotation
5+
java.lang.classfile
6+
java.lang.classfile.attribute
7+
java.lang.classfile.constantpool
8+
java.lang.classfile.instruction
59
java.lang.constant
610
java.lang.foreign
711
java.lang.invoke
@@ -91,6 +95,7 @@ javax.print
9195
javax.print.attribute
9296
javax.print.attribute.standard
9397
javax.print.event
98+
javax.sound
9499
javax.sound.midi
95100
javax.sound.midi.spi
96101
javax.sound.sampled
@@ -210,7 +215,6 @@ com.sun.source.tree
210215
com.sun.source.util
211216
com.sun.tools.javac
212217
module:jdk.crypto.cryptoki
213-
module:jdk.crypto.ec
214218
module:jdk.dynalink
215219
jdk.dynalink
216220
jdk.dynalink.beans
@@ -255,6 +259,7 @@ module:jdk.jstatd
255259
module:jdk.localedata
256260
module:jdk.management
257261
com.sun.management
262+
jdk.management
258263
module:jdk.management.agent
259264
module:jdk.management.jfr
260265
jdk.management.jfr
@@ -279,4 +284,4 @@ org.w3c.dom.css
279284
org.w3c.dom.html
280285
org.w3c.dom.stylesheets
281286
org.w3c.dom.xpath
282-
module:jdk.zipfs
287+
module:jdk.zipfs

buildSrc/src/main/kotlin/Env.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object Env {
5252
* Information about the library and author.
5353
*/
5454
object JPX {
55-
const val VERSION = "4.0.0-SNAPSHOT"
55+
const val VERSION = "4.0.0"
5656
const val ID = "jpx"
5757
const val NAME = "jpx"
5858
const val GROUP = "io.jenetics"

gradle/libs.versions.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
2-
assertj = "3.27.4"
3-
codemodel = "4.0.5"
2+
assertj = "3.27.7"
3+
codemodel = "4.0.6"
44
commons-csv = "1.14.1"
55
commons-math4-legacy = "4.0-beta1"
66
commons-numbers-combinatorics = "1.2"
@@ -9,35 +9,35 @@ commons-numbers-gamma = "1.2"
99
commons-numbers-rootfinder = "1.2"
1010
commons-rng-sampling = "1.6"
1111
commons-rng-simple = "1.6"
12-
commons-statistics-descriptive = "1.1"
13-
commons-statistics-distribution = "1.1"
14-
equalsverifier = "4.0.9"
12+
commons-statistics-descriptive = "1.2"
13+
commons-statistics-distribution = "1.2"
14+
equalsverifier = "4.4"
1515
facilejdbc = "2.1.1"
16-
guava = "33.4.8-jre"
17-
h2 = "2.3.232"
18-
jackson = "2.19.2"
19-
jackson-databind-nullable = "0.2.7"
20-
jackson-datatype-jsr310 = "2.19.2"
21-
jacoco-agent = "0.8.13"
16+
guava = "33.5.0-jre"
17+
h2 = "2.4.240"
18+
jackson = "2.21"
19+
jackson-databind-nullable = "0.2.9"
20+
jackson-datatype-jsr310 = "2.21.0"
21+
jacoco-agent = "0.8.14"
2222
jakarta-annotation-api = "3.0.0"
2323
jakarta-validation-api = "3.1.1"
2424
javacsv = "2.0"
25-
jexl = "3.5.0"
25+
jexl = "3.6.2"
2626
jmh = "0.7.3"
2727
jpx = "3.2.1"
28-
lombok = "8.14.2"
28+
lombok = "9.2.0"
2929
mvel = "2.5.2.Final"
3030
nashorn = "15.7"
31-
openapi-generator = "7.14.0"
31+
openapi-generator = "7.20.0"
3232
opencsv = "5.12.0"
3333
prngine = "2.0.0"
34-
reactor-core = "3.7.9"
34+
reactor-core = "3.8.3"
3535
rxjava = "2.2.21"
3636
supercsv = "2.4.0"
37-
swagger-models = "2.2.36"
38-
swagger-parser = "2.1.32"
39-
testng = "7.11.0"
40-
version-catalog-update = "1.0.0"
37+
swagger-models = "2.2.43"
38+
swagger-parser = "2.1.38"
39+
testng = "7.12.0"
40+
version-catalog-update = "1.1.0"
4141

4242
[plugins]
4343
jmh = { id = "me.champeau.jmh", version.ref = "jmh" }
@@ -63,7 +63,7 @@ facilejdbc = { module = "io.jenetics:facilejdbc", version.ref = "facilejdbc" }
6363
guava = { module = "com.google.guava:guava", version.ref = "guava" }
6464
h2 = { module = "com.h2database:h2", version.ref = "h2" }
6565
jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson" }
66-
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
66+
jackson-databind = "com.fasterxml.jackson.core:jackson-databind:2.21.0"
6767
jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "jackson-databind-nullable" }
6868
jackson-datatype-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "jackson-datatype-jsr310" }
6969
jacoco-agent = { module = "org.jacoco:org.jacoco.agent", version.ref = "jacoco-agent" }

gradle/wrapper/gradle-wrapper.jar

1.83 KB
Binary file not shown.

gradlew

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jpx/src/main/java/io/jenetics/jpx/Bounds.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ public int hashCode() {
117117

118118
@Override
119119
public boolean equals(final Object obj) {
120-
return obj == this ||
121-
obj instanceof Bounds bounds &&
120+
return obj instanceof Bounds bounds &&
122121
Objects.equals(bounds._minLatitude, _minLatitude) &&
123122
Objects.equals(bounds._minLongitude, _minLongitude) &&
124123
Objects.equals(bounds._maxLatitude, _maxLatitude) &&
@@ -140,7 +139,6 @@ public String toString() {
140139
* Return a collector which calculates the bounds of a given way-point
141140
* stream. The following example shows how to calculate the bounds of all
142141
* track-points of a given GPX object.
143-
*
144142
* {@snippet lang="java":
145143
* final Bounds bounds = gpx.tracks()
146144
* .flatMap(Track::segments)

0 commit comments

Comments
 (0)