Skip to content

Commit 770a8d8

Browse files
authored
Merge pull request #1441 from lesserwhirls/gradle
Upgrade to gradle 8.13
2 parents 10c421d + 1356705 commit 770a8d8

File tree

26 files changed

+238
-177
lines changed

26 files changed

+238
-177
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
# test against latest 8, 11, 17 of zulu and temurin java
10-
java-version: [8, 11, 17]
9+
# test against latest 8, 11, 17, 21 of zulu and temurin java
10+
java-version: [8, 11, 17, 21]
1111
java-vendor: ['zulu', 'temurin', 'corretto']
1212
steps:
1313
- uses: actions/checkout@v4

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ gradle.projectsEvaluated {
8484

8585
tasks.named('wrapper') {
8686
distributionType = Wrapper.DistributionType.ALL
87-
gradleVersion = '6.9.1'
87+
gradleVersion = '8.13'
8888
}
8989

9090
// Set up properties needed for all testing, adds "testAll" task to root
9191
apply from: "$rootDir/gradle/root/testing.gradle"
9292
// Generates coverage report for testAll
93-
apply from: "$rootDir/gradle/root/coverage.gradle"
93+
//apply from: "$rootDir/gradle/root/coverage.gradle"
9494
// Attaches fatJar tasks to root project (makes toolsUI, ncIdv, etc.)
9595
apply from: "$rootDir/gradle/root/fatJars.gradle"
9696
// Creates pubs for artifacts created in fatJars.gradle

cdm-test-utils/src/main/java/ucar/unidata/util/test/UtilsTestStructureArray.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ private void testArrayStructureByRecno(ArrayStructure as) {
7575
List<StructureMembers.Member> members = sdata.getMembers();
7676
for (StructureMembers.Member m : members) {
7777
Array sdataArray = sdata.getArray(m);
78-
assert (sdataArray.getElementType() == m.getDataType().getPrimitiveClassType()) : sdataArray.getElementType()
79-
+ " != " + m.getDataType().getPrimitiveClassType();
78+
assert (sdataArray.getElementType() == m.getDataType().getPrimitiveClassType())
79+
: sdataArray.getElementType() + " != " + m.getDataType().getPrimitiveClassType();
8080

8181
Array sdataArray2 = sdata.getArray(m.getName());
8282
UtilsMa2Test.testEquals(sdataArray, sdataArray2);

cdm-test/src/test/java/ucar/nc2/dataset/TestTransforms.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ private VerticalTransform test(NetcdfDataset ncd, String levName, String varName
309309
// should be compatible with vunit
310310
if (vunit != null) {
311311
String vertCoordUnit = vt.getUnitString();
312-
assert vunit.isCompatible(vertCoordUnit) : vertCoordUnit + " not udunits compatible with "
313-
+ vunit.getUnitString();
312+
assert vunit.isCompatible(vertCoordUnit)
313+
: vertCoordUnit + " not udunits compatible with " + vunit.getUnitString();
314314
}
315315

316316
return vt;

cdm-test/src/test/java/ucar/nc2/ncml/TestNcMLStrides.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public void testStride(String stride) throws IOException, InvalidRangeException
100100
Index ci = correct.getIndex();
101101
Index di = data.getIndex();
102102
for (int i = 0; i < data.getSize(); i++)
103-
assert (data.getInt(di.set(i)) == correct.getInt(ci.set(i))) : stride + " index " + i + " = "
104-
+ data.getInt(di.set(i)) + " != " + correct.getInt(ci.set(i));
103+
assert (data.getInt(di.set(i)) == correct.getInt(ci.set(i)))
104+
: stride + " index " + i + " = " + data.getInt(di.set(i)) + " != " + correct.getInt(ci.set(i));
105105
}
106106

107107
}

cdm/core/src/main/java/ucar/ma2/ArrayStructureMA.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,9 @@ public static ArrayStructureMA factoryMA(ArrayStructure from) throws IOException
228228
if (numRecords == -1) {
229229
numRecords = firstDimLen;
230230
} else {
231-
assert numRecords == firstDimLen : String.format(
232-
"Expected all structure members to have the same first" + "dimension length, but %d != %d.", numRecords,
233-
firstDimLen);
231+
assert numRecords == firstDimLen
232+
: String.format("Expected all structure members to have the same first" + "dimension length, but %d != %d.",
233+
numRecords, firstDimLen);
234234
}
235235

236236
memberArrayMap.put(m.getName(), array);

cdm/core/src/main/java/ucar/nc2/ft/point/standard/plug/CFpointObs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@ protected TableConfig getTimeSeriesProfileConfig(NetcdfDataset ds, EncodingInfo
420420
// zDim = z.getDimension(0);
421421
}
422422
} else { // 1d time
423-
assert z.getRank() != 1
424-
|| !time.getDimension(0).equals(z.getDimension(0)) : "time and z dimensions must be different";
423+
assert z.getRank() != 1 || !time.getDimension(0).equals(z.getDimension(0))
424+
: "time and z dimensions must be different";
425425
}
426426

427427
TableConfig profileTable = makeMultidimInner(ds, stationTable, info.childDim, info, errlog);

cdm/core/src/main/java/ucar/nc2/ft2/coverage/HorizCoordSys.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,8 @@ private static int calcStride(int numTotal, int maxToInclude) {
756756
int stride = Math.max(1, (int) Math.ceil(numTotal / (double) maxToInclude));
757757
int numIncluded = (int) Math.ceil(numTotal / (double) stride);
758758

759-
assert numIncluded <= maxToInclude : String.format("We're set to include %d points, but we wanted a max of %d.",
760-
numIncluded, maxToInclude);
759+
assert numIncluded <= maxToInclude
760+
: String.format("We're set to include %d points, but we wanted a max of %d.", numIncluded, maxToInclude);
761761
return stride;
762762
}
763763

@@ -766,9 +766,9 @@ private static void assertNotExceedingMaxBoundaryPoints(int numBoundaryPoints, i
766766
// Widen to long to avoid possible overflow, because last two arguments will often be Integer.MAX_VALUE.
767767
long maxBoundaryPoints = 2 * (long) maxPointsInYEdge + 2 * (long) maxPointsInXEdge;
768768

769-
assert numBoundaryPoints <= maxBoundaryPoints : String.format(
770-
"We should be returning a maximum of %d boundary points, but we're returning %d instead.", maxBoundaryPoints,
771-
numBoundaryPoints);
769+
assert numBoundaryPoints <= maxBoundaryPoints
770+
: String.format("We should be returning a maximum of %d boundary points, but we're returning %d instead.",
771+
maxBoundaryPoints, numBoundaryPoints);
772772
}
773773

774774
/**

cdm/core/src/test/java/thredds/client/catalog/TestResolve.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public void testResolve() throws IOException {
2828
logger.debug("ACD service= {}", s);
2929

3030
assert getAccessURL(cat, "nest11").equals("http://www.acd.ucar.edu/dods/testServer/flux/CO2.nc");
31-
assert getAccessURL(cat, "nest12").equals(base + "netcdf/data/flux/NO2.nc") : getAccessURL(cat, "nest12") + " != "
32-
+ ClientCatalogUtil.makeFilepath() + "netcdf/data/flux/NO2.nc";
31+
assert getAccessURL(cat, "nest12").equals(base + "netcdf/data/flux/NO2.nc")
32+
: getAccessURL(cat, "nest12") + " != " + ClientCatalogUtil.makeFilepath() + "netcdf/data/flux/NO2.nc";
3333

3434
assert getMetadataURL(cat, "nest1", "NETCDF").equals("any.xml");
3535
assert getMetadataURL(cat, "nest1", "ADN").equals("http://you/corrupt.xml");

cdm/gcdm/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ task startDaemon(type: JavaExecFork) {
8282
stopAfter = test
8383
waitForPort = 16111
8484
waitForOutput = 'Server started, listening on 16111'
85+
dependsOn testClasses
8586
}
8687

8788
test.dependsOn(startDaemon)

0 commit comments

Comments
 (0)