From b61af50089d9eb1efa2c4007c930e65ddd499c12 Mon Sep 17 00:00:00 2001 From: Esta Nagy Date: Thu, 10 Aug 2023 23:28:34 +0200 Subject: [PATCH] Maintenance (#666) - Updates Checkstyle version - Updates JaCoCo version - Adds toolchains to build files - Prepares for the next Gradle upgrade - Fixes two violations noticed by the new Checkstyle {patch} Signed-off-by: Esta Nagy --- build.gradle | 5 +- gradle/libs.versions.toml | 4 +- gradle/verification-metadata.xml | 386 +++++++++++++----- .../certificate/impl/KeyUsageEnum.java | 2 +- ...imeActionSerializationIntegrationTest.java | 2 +- lowkey-vault-client/build.gradle | 1 + lowkey-vault-docker/build.gradle | 5 +- 7 files changed, 302 insertions(+), 103 deletions(-) diff --git a/build.gradle b/build.gradle index e350b275..470a46e1 100644 --- a/build.gradle +++ b/build.gradle @@ -70,12 +70,15 @@ configure(subprojects.findAll({ version = rootProject.version //noinspection GroovyUnusedAssignment - sourceCompatibility = '11' repositories { mavenCentral() } java { + sourceCompatibility = JavaVersion.VERSION_11 + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } withJavadocJar() withSourcesJar() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4d951ad2..c3b4d0ab 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,8 +18,8 @@ cucumber = "7.13.0" mockitoCore = "5.4.0" jupiter = "5.10.0" abortMission = "4.2.30" -checkstyle = "9.2.1" -jacoco = "0.8.2" +checkstyle = "10.12.2" +jacoco = "0.8.10" jacksonBom = { strictly = "2.15.2" } jackson = { strictly = "2.15.2" } openApiUi = "1.7.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index b50a866b..59d5428e 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -521,6 +521,11 @@ + + + + + @@ -573,6 +578,14 @@ + + + + + + + + @@ -589,14 +602,6 @@ - - - - - - - - @@ -607,11 +612,6 @@ - - - - - @@ -625,14 +625,6 @@ - - - - - - - - @@ -659,11 +651,6 @@ - - - - - @@ -798,12 +785,12 @@ - - - + + + - - + + @@ -990,12 +977,12 @@ - - - + + + - - + + @@ -1490,12 +1477,12 @@ - - - + + + - - + + @@ -1506,14 +1493,22 @@ + + + + + - - - + + + + + + @@ -1524,14 +1519,6 @@ - - - - - - - - @@ -1577,6 +1564,11 @@ + + + + + @@ -1635,6 +1627,14 @@ + + + + + + + + @@ -1660,6 +1660,11 @@ + + + + + @@ -1711,6 +1716,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -1747,6 +1775,11 @@ + + + + + @@ -1757,6 +1790,11 @@ + + + + + @@ -1765,6 +1803,14 @@ + + + + + + + + @@ -1786,6 +1832,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1898,6 +1978,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1980,6 +2107,19 @@ + + + + + + + + + + + + + @@ -2043,6 +2183,11 @@ + + + + + @@ -2066,6 +2211,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2074,6 +2248,14 @@ + + + + + + + + @@ -2224,41 +2406,41 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + @@ -2545,12 +2727,9 @@ - - - - - - + + + @@ -2569,28 +2748,25 @@ - - - + + + - - + + - - - - - - + + + - - - + + + - - + + @@ -2601,6 +2777,14 @@ + + + + + + + + @@ -3152,6 +3336,14 @@ + + + + + + + + diff --git a/lowkey-vault-app/src/main/java/com/github/nagyesta/lowkeyvault/service/certificate/impl/KeyUsageEnum.java b/lowkey-vault-app/src/main/java/com/github/nagyesta/lowkeyvault/service/certificate/impl/KeyUsageEnum.java index 82c1e011..02aa83e9 100644 --- a/lowkey-vault-app/src/main/java/com/github/nagyesta/lowkeyvault/service/certificate/impl/KeyUsageEnum.java +++ b/lowkey-vault-app/src/main/java/com/github/nagyesta/lowkeyvault/service/certificate/impl/KeyUsageEnum.java @@ -96,7 +96,7 @@ public static Collector toKeyUsage() { return new MergingKeyUsageCollector(); } - private static class MergingKeyUsageCollector implements Collector { + private static final class MergingKeyUsageCollector implements Collector { @Override public Supplier supplier() { return AtomicInteger::new; diff --git a/lowkey-vault-app/src/test/java/com/github/nagyesta/lowkeyvault/model/json/util/CertificateLifetimeActionSerializationIntegrationTest.java b/lowkey-vault-app/src/test/java/com/github/nagyesta/lowkeyvault/model/json/util/CertificateLifetimeActionSerializationIntegrationTest.java index d48562e4..88e46e87 100644 --- a/lowkey-vault-app/src/test/java/com/github/nagyesta/lowkeyvault/model/json/util/CertificateLifetimeActionSerializationIntegrationTest.java +++ b/lowkey-vault-app/src/test/java/com/github/nagyesta/lowkeyvault/model/json/util/CertificateLifetimeActionSerializationIntegrationTest.java @@ -80,7 +80,7 @@ void testDeserializeShouldReturnExpectedEnumWhenCalledWithInvalidJsonObject(fina } @Data - private static class TestObjectType { + private static final class TestObjectType { @JsonSerialize(using = CertificateLifetimeActionSerializer.class) @JsonDeserialize(using = CertificateLifetimeActionDeserializer.class) private CertificateLifetimeActionActivity action; diff --git a/lowkey-vault-client/build.gradle b/lowkey-vault-client/build.gradle index 674a7fc5..2f0582a7 100644 --- a/lowkey-vault-client/build.gradle +++ b/lowkey-vault-client/build.gradle @@ -28,6 +28,7 @@ dependencies { annotationProcessor libs.lombok testImplementation libs.mockito.core testImplementation libs.jupiter + testRuntimeOnly("org.junit.platform:junit-platform-launcher") testImplementation libs.logback.classic } diff --git a/lowkey-vault-docker/build.gradle b/lowkey-vault-docker/build.gradle index 2dcf43a9..7e44b2c1 100644 --- a/lowkey-vault-docker/build.gradle +++ b/lowkey-vault-docker/build.gradle @@ -7,12 +7,15 @@ plugins { version = rootProject.version //noinspection GroovyUnusedAssignment -sourceCompatibility = '11' repositories { mavenCentral() } java { + sourceCompatibility = JavaVersion.VERSION_11 + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } withJavadocJar() withSourcesJar() }