Skip to content

Commit 12c5ba8

Browse files
committed
Use ben-manes versions plugin to identify outdated dependencies
Based on the report, updated several 3rd party dependencies.
1 parent 9a80e07 commit 12c5ba8

4 files changed

Lines changed: 47 additions & 22 deletions

File tree

build-logic-ncj/build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
/*
2-
* Copyright (c) 2025 University Corporation for Atmospheric Research/Unidata
2+
* Copyright (c) 2025-2026 University Corporation for Atmospheric Research/Unidata
33
* See LICENSE for license information.
44
*/
55

66
plugins {
77
`kotlin-dsl`
88
alias(ncjLibs.plugins.protobuf)
99
alias(ncjLibs.plugins.spotless)
10+
alias(ncjLibs.plugins.versions)
1011
}
1112

1213
dependencies {
1314
implementation(plugin(ncjLibs.plugins.protobuf))
1415
implementation(plugin(ncjLibs.plugins.spotless))
16+
implementation(plugin(ncjLibs.plugins.versions))
1517
}
1618

1719
spotless {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2026 University Corporation for Atmospheric Research/Unidata
3+
* See LICENSE for license information.
4+
*/
5+
6+
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
7+
8+
plugins { id("com.github.ben-manes.versions") }
9+
10+
// https://github.com/ben-manes/gradle-versions-plugin
11+
fun isNonStable(version: String): Boolean {
12+
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
13+
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
14+
val isStable = stableKeyword || regex.matches(version)
15+
return isStable.not()
16+
}
17+
18+
// don't suggest release candidates if currently on a stable version
19+
tasks.withType<DependencyUpdatesTask> {
20+
rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) }
21+
}

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
plugins {
77
id("ncj-java-base-conventions")
88
alias(ncjLibs.plugins.spotless)
9+
id("ncj-versions-conventions")
910
}
1011

1112
description = "The Unidata netCDF-Java library (aka CDM)."

gradle/ncj.libs.versions.toml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ netcdf-java = "5.10.0-SNAPSHOT"
44
unidata-doc-theme = "0.1.1"
55

66
# 3rd party dependencies
7-
awssdk = "2.31.76"
8-
awssdkv1 = "1.12.649"
7+
awssdk = "2.43.0"
8+
awssdkv1 = "1.12.797"
99
commons-math3 = "3.6.1"
1010
bounce = "0.18"
11-
grpc = "1.73.0"
12-
guava = "33.4.8-jre"
13-
httpcomponents = "4.5.13"
14-
jackson = "2.21.1"
15-
jcommander = "1.78"
11+
grpc = "1.80.0"
12+
guava = "33.6.0-jre"
13+
httpcomponents = "4.5.14"
14+
jackson = "2.21.3"
15+
jcommander = "1.82"
1616
jdom2 = "2.0.6.1"
17-
jfree-jcommon = "1.0.23"
17+
jfree-jcommon = "1.0.24"
1818
jfree-jfreechart = "1.0.19"
1919
jgoodies-forms = "1.6.0"
2020
jj2000 = "5.4"
21-
joda-time = "2.12.7"
21+
joda-time = "2.14.2"
2222
jsr305 = "3.0.2"
23-
jna = "5.17.0"
24-
lgooddatepicker = "10.3.1"
23+
jna = "5.18.1"
24+
lgooddatepicker = "11.2.1"
2525
mcidas = "20231121"
26-
protobuf = "4.31.1"
27-
re2j = "1.3"
26+
protobuf = "4.34.1"
27+
re2j = "1.8"
2828
sensorweb-waterml = "2.7.0"
2929
slf4j = "2.0.17"
3030
tomcat-annotations = "6.0.53"
31-
visad = "2.0-20130124"
31+
visad = "2.0-20191209"
3232
xmlbeans = "3.1.0"
3333

3434
#testing only
35-
commons-compress = "1.12"
36-
commons-io = "2.5"
37-
jsoup = "1.11.2"
38-
junit4 = "4.13.1"
39-
junit5 = "5.14.0"
35+
commons-compress = "1.28.0"
36+
commons-io = "2.22.0"
37+
jsoup = "1.22.2"
38+
junit4 = "4.13.2"
39+
junit5 = "5.14.4"
4040
junitparams = "1.0.5"
4141
mockito-core = "2.28.2"
4242
testcontainers = "1.21.4"
43-
truth = "1.0"
43+
truth = "1.4.5"
4444

4545
# runtime only
46-
logback-classic = "1.3.15"
46+
logback-classic = "1.5.32"
4747

4848
[libraries]
4949

@@ -117,3 +117,4 @@ javacc = { id = "org.javacc.javacc", version = "4.0.3" }
117117
protobuf = { id = "com.google.protobuf", version = "0.10.0" }
118118
shadow = { id = "com.gradleup.shadow", version = "9.4.1" }
119119
spotless = { id = "com.diffplug.spotless", version = "8.4.0" }
120+
versions = { id = "com.github.ben-manes.versions", version = "0.54.0" }

0 commit comments

Comments
 (0)