Skip to content

Commit 9ff6ea9

Browse files
authored
Upgrade dependencies (#134)
* Upgrade dependencies. * Fix Github Actions Java version identifier.
1 parent bfe45a8 commit 9ff6ea9

File tree

11 files changed

+67
-63
lines changed

11 files changed

+67
-63
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- master
2020

2121
env:
22-
JAVA_VERSION: '17.0.8+7'
22+
JAVA_VERSION: '21.0.3+9.0.LTS'
2323
JAVA_DISTRIBUTION: 'temurin'
2424

2525
jobs:

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- master
2020

2121
env:
22-
JAVA_VERSION: '17.0.8+7'
22+
JAVA_VERSION: '21.0.3+9.0.LTS'
2323
JAVA_DISTRIBUTION: 'temurin'
2424
TEST_SCREEN_WIDTH: '1920'
2525
TEST_SCREEN_HEIGHT: '1080'

build.gradle

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
plugins {
2020
id 'application'
2121
id 'org.openjfx.javafxplugin' version '0.1.0'
22-
id 'org.javamodularity.moduleplugin' version '1.8.12'
23-
id 'com.github.ben-manes.versions' version '0.49.0'
22+
id 'org.javamodularity.moduleplugin' version '1.8.15'
23+
id 'com.github.ben-manes.versions' version '0.51.0'
2424
id 'org.beryx.jlink' version '3.0.1'
2525
id 'jacoco'
26-
id 'net.ltgt.errorprone' version '3.1.0'
27-
id 'org.sonarqube' version '4.4.1.3373'
26+
id 'net.ltgt.errorprone' version '4.0.1'
27+
id 'org.sonarqube' version '5.1.0.4882'
2828
id 'org.ysb33r.cloudci' version '4.0.0'
2929
id 'com.github.hierynomus.license' version '0.16.1'
3030
id 'io.miret.etienne.sass' version '1.5.0'
31+
id "com.ryandens.javaagent-test" version "0.5.1"
3132
}
3233

3334
group 'com.github.mfl28'
@@ -39,15 +40,16 @@ repositories {
3940

4041
dependencies {
4142
// Junit (Unit testing)
42-
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
43+
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
44+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
4345

4446
// TestFx UI TesTing // https://mvnrepository.com/artifact/org.testfx/testfx-junit5
45-
testImplementation('org.testfx:testfx-junit5:4.0.17') {
47+
testImplementation('org.testfx:testfx-junit5:4.0.18') {
4648
exclude group: 'org.hamcrest'
4749
}
4850

4951
// https://mvnrepository.com/artifact/nl.jqno.equalsverifier/equalsverifier
50-
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.15.2'
52+
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.16.1'
5153

5254
// Hamcrest https://mvnrepository.com/artifact/org.hamcrest/hamcrest
5355
testImplementation 'org.hamcrest:hamcrest:2.2'
@@ -56,65 +58,67 @@ dependencies {
5658
testImplementation 'org.mockito:mockito-inline:5.2.0'
5759

5860
// Mockito-Junit https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter
59-
testImplementation 'org.mockito:mockito-junit-jupiter:5.6.0'
61+
testImplementation 'org.mockito:mockito-junit-jupiter:5.12.0'
6062

6163
testImplementation 'com.google.jimfs:jimfs:1.3.0'
6264

65+
testJavaagent "net.bytebuddy:byte-buddy-agent:1.14.18"
66+
6367
// Commons Collections https://mvnrepository.com/artifact/org.apache.commons/commons-collections4
6468
implementation 'org.apache.commons:commons-collections4:4.4'
6569

6670
// Commons Lang https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
67-
implementation 'org.apache.commons:commons-lang3:3.13.0'
71+
implementation 'org.apache.commons:commons-lang3:3.14.0'
6872

6973
// https://mvnrepository.com/artifact/commons-io/commons-io
70-
implementation 'commons-io:commons-io:2.15.0'
74+
implementation 'commons-io:commons-io:2.16.1'
7175

7276
// ControlsFX https://mvnrepository.com/artifact/org.controlsfx/controlsfx
73-
implementation('org.controlsfx:controlsfx:11.1.2') {
77+
implementation('org.controlsfx:controlsfx:11.2.1') {
7478
exclude group: 'org.openjfx'
7579
}
7680

7781
// Caffeine https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine
7882
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8'
7983

8084
// Gradle plugin to use the error-prone compiler https://github.com/tbroyer/gradle-errorprone-plugin
81-
errorprone 'com.google.errorprone:error_prone_core:2.23.0'
85+
errorprone 'com.google.errorprone:error_prone_core:2.28.0'
8286

8387
// Google GSON https://github.com/google/gson
84-
implementation 'com.google.code.gson:gson:2.10.1'
88+
implementation 'com.google.code.gson:gson:2.11.0'
8589

8690
// Jersey REST client https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client
87-
implementation 'org.glassfish.jersey.core:jersey-client:3.1.3'
91+
implementation 'org.glassfish.jersey.core:jersey-client:3.1.7'
8892

8993
// HK2 InjectionManager https://mvnrepository.com/artifact/org.glassfish.jersey.inject/jersey-hk2
90-
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.3'
94+
implementation 'org.glassfish.jersey.inject:jersey-hk2:3.1.7'
9195

9296
// Jersey Multipart https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart
93-
implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.1.3'
97+
implementation 'org.glassfish.jersey.media:jersey-media-multipart:3.1.7'
9498

9599
// Jaxb runtime https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-runtime
96-
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.4'
100+
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5'
97101

98102
// Mimepull https://mvnrepository.com/artifact/org.jvnet.mimepull/mimepull
99103
implementation 'org.jvnet.mimepull:mimepull:1.10.0'
100104

101105
// Xml bind https://mvnrepository.com/artifact/jakarta.xml.bind/jakarta.xml.bind-api
102-
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
106+
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
103107

104108
// https://mvnrepository.com/artifact/jakarta.ws.rs/jakarta.ws.rs-api
105-
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0'
109+
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:4.0.0'
106110

107111
// https://mvnrepository.com/artifact/org.locationtech.jts/jts-core
108112
implementation 'org.locationtech.jts:jts-core:1.19.0'
109113

110114
// https://mvnrepository.com/artifact/com.drewnoakes/metadata-extractor
111-
implementation 'com.drewnoakes:metadata-extractor:2.18.0'
115+
implementation 'com.drewnoakes:metadata-extractor:2.19.0'
112116

113117
implementation 'com.opencsv:opencsv:5.9'
114118
}
115119

116120
javafx {
117-
version = '21.0.1'
121+
version = '22.0.1'
118122
modules = ['javafx.base', 'javafx.graphics', 'javafx.controls', 'javafx.swing']
119123
}
120124

@@ -168,7 +172,7 @@ tasks.named("dependencyUpdates").configure {
168172
}
169173

170174
compileSass {
171-
outputDir = project.file ("${buildDir}/resources/main/stylesheets/css")
175+
outputDir = layout.buildDirectory.file ("resources/main/stylesheets/css").get().asFile
172176
destPath = "."
173177
sourceDir = project.file ("${projectDir}/src/main/resources/stylesheets/scss")
174178
style = expanded
@@ -199,12 +203,12 @@ application {
199203
java {
200204
modularity.inferModulePath = false
201205
toolchain {
202-
languageVersion.set(JavaLanguageVersion.of(17))
206+
languageVersion.set(JavaLanguageVersion.of(21))
203207
}
204208
}
205209

206210
jlink {
207-
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
211+
options = ['--strip-debug', '--compress', 'zip-6', '--no-header-files', '--no-man-pages']
208212
launcher {
209213
name = 'BoundingBoxEditor'
210214
jvmArgs = ['-Dprism.forceGPU=true', '-Djava.net.preferIPv6Addresses=system']
@@ -218,7 +222,7 @@ jlink {
218222
uses 'jakarta.ws.rs.ext.RuntimeDelegate'
219223
}
220224

221-
imageZip = project.file("${buildDir}/distributions/boundingboxeditor-${javafx.platform.classifier}.zip")
225+
imageZip = layout.buildDirectory.file("distributions/boundingboxeditor-${javafx.platform.classifier}.zip")
222226

223227
jpackage {
224228
installerOptions += [
@@ -258,7 +262,7 @@ jlink {
258262
}
259263
}
260264

261-
task dist {
265+
tasks.register('dist') {
262266
dependsOn clean, jlinkZip
263267
}
264268

gradle/wrapper/gradle-wrapper.jar

-17.7 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,26 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
197198
done
198199
fi
199200

200-
# Collect all arguments for the java command;
201-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202-
# shell script including quotes and variable substitutions, so put them in
203-
# double quotes to make sure that they get re-expanded; and
204-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
205210

206211
set -- \
207212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

src/main/java/com/github/mfl28/boundingboxeditor/model/data/ImageMetaData.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.io.Serial;
3434
import java.util.Iterator;
3535
import java.util.List;
36+
import java.util.Locale;
3637
import java.util.Objects;
3738

3839
/**
@@ -195,7 +196,7 @@ private static ImageDimensions readImageDimensionsFromFile(File imageFile) throw
195196
try {
196197
reader.setInput(imageStream);
197198

198-
final String imageFormatName = reader.getFormatName().toLowerCase();
199+
final String imageFormatName = reader.getFormatName().toLowerCase(Locale.ENGLISH);
199200

200201
if(!supportedImageFormats.contains(imageFormatName)) {
201202
throw new UnsupportedImageFileException(UNSUPPORTED_IMAGE_FORMAT_ERROR_MESSAGE);

src/main/java/com/github/mfl28/boundingboxeditor/model/io/PVOCLoadStrategy.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ private void parseBoundingShapeDataTag(Element tagElement, BoundingShapeDataPars
256256
String poseValue = tagElement.getTextContent();
257257

258258
if(poseValue != null && !poseValue.equalsIgnoreCase("unspecified")) {
259-
boxDataParseResult.getTags().add("pose: " + poseValue.toLowerCase());
259+
boxDataParseResult.getTags().add("pose: " + poseValue.toLowerCase(Locale.ENGLISH));
260260
}
261261

262262
break;
@@ -458,18 +458,10 @@ public List<String> getTags() {
458458
return tags;
459459
}
460460

461-
public void setTags(List<String> tags) {
462-
this.tags = tags;
463-
}
464-
465461
public List<BoundingShapeData> getParts() {
466462
return parts;
467463
}
468464

469-
public void setParts(List<BoundingShapeData> parts) {
470-
this.parts = parts;
471-
}
472-
473465
public List<Double> getPoints() {
474466
return points;
475467
}

src/main/java/com/github/mfl28/boundingboxeditor/model/io/PVOCSaveStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private Element createXmlElementFromBoundingShapeData(final Document document, S
177177
List<String> actionTags = new ArrayList<>();
178178

179179
for(String tag : boundingShapeData.getTags()) {
180-
String lowerCaseTag = tag.toLowerCase();
180+
String lowerCaseTag = tag.toLowerCase(Locale.ENGLISH);
181181

182182
if(lowerCaseTag.startsWith("pose:")) {
183183
poseString = StringUtils.capitalize(lowerCaseTag.substring(5).stripLeading());

0 commit comments

Comments
 (0)