diff --git a/build-logic/src/main/groovy/org.spongepowered.configurate.build.component.gradle b/build-logic/src/main/groovy/org.spongepowered.configurate.build.component.gradle index ff3c4f00f..b531b42e4 100644 --- a/build-logic/src/main/groovy/org.spongepowered.configurate.build.component.gradle +++ b/build-logic/src/main/groovy/org.spongepowered.configurate.build.component.gradle @@ -1,4 +1,5 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis +import net.kyori.indra.util.Versioning import org.eclipse.jgit.lib.Repository import org.gradle.api.artifacts.CacheableRule import org.gradle.api.artifacts.ComponentMetadataContext @@ -79,8 +80,8 @@ tasks.withType(Javadoc).configureEach { options.links( "https://lightbend.github.io/config/latest/api/", "https://fasterxml.github.io/jackson-core/javadoc/2.10/", - "https://www.javadoc.io/doc/org.checkerframework/checker-qual/${libs.versions.checkerQual}/", - "https://www.javadoc.io/doc/io.leangen.geantyref/geantyref/${libs.versions.geantyref}/" + "https://www.javadoc.io/doc/org.checkerframework/checker-qual/${libs.versions.checkerQual.get()}/", + "https://www.javadoc.io/doc/io.leangen.geantyref/geantyref/${libs.versions.geantyref.get()}/" ) options.linkSource() } @@ -144,6 +145,11 @@ plugins.withId('org.jetbrains.kotlin.jvm') { ktfmt(libs.versions.ktfmt.get()).kotlinlangStyle() } + plugins.withId("io.gitlab.arturbosch.detekt") { + tasks.named("detekt").configure { + jvmTarget = Versioning.versionString(indra.javaVersions().target().get()) + } + } } tasks.named('copyJavadoc') { diff --git a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java index 83c7fd377..269d765e0 100644 --- a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java +++ b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java @@ -109,7 +109,7 @@ void testDefaultsApplied() throws SerializationException { } @ConfigSerializable - private static class CommentedObject { + private static final class CommentedObject { @Setting("commented-key") @Comment("You look nice today") private String color; @@ -150,7 +150,7 @@ void testNoArglessConstructor() { } @ConfigSerializable - private static class TestObjectChild extends TestObject { + private static final class TestObjectChild extends TestObject { @Setting("child-setting") private boolean childSetting; } @@ -167,7 +167,7 @@ void testSuperclassFieldsIncluded() throws SerializationException { } @ConfigSerializable - private static class FieldNameObject { + private static final class FieldNameObject { @Setting private boolean loads; } @@ -181,12 +181,12 @@ void testKeyFromFieldName() throws SerializationException { assertTrue(obj.loads); } - private static class ParentObject { + private static final class ParentObject { @Comment("Comment on parent") private InnerObject inner = new InnerObject(); } @ConfigSerializable - private static class InnerObject { + private static final class InnerObject { @Comment("Something") private String test = "Default value"; } @@ -206,7 +206,7 @@ private interface ParentInterface { String test(); } - private static class ChildObject implements ParentInterface { + private static final class ChildObject implements ParentInterface { @Comment("Something") private String test = "Default value"; @Override public String test() { @@ -215,7 +215,7 @@ private static class ChildObject implements ParentInterface { } @ConfigSerializable - private static class ContainingObject { + private static final class ContainingObject { @Setting ParentInterface inner = new ChildObject(); @Setting List list = new ArrayList<>(); } diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java index fa7af991e..7584685e6 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java @@ -47,7 +47,7 @@ void testSerializeCustomNumber() { assertNull(serializer, "Type serializer for custom number class should be null!"); } - private static class CustomNumber extends Number { + private static final class CustomNumber extends Number { public static final long serialVersionUID = 4647727438607023527L; @Override diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java index 4424da23a..2a281d40d 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java @@ -309,7 +309,7 @@ void testMapSerializerPreservesChildComments() throws SerializationException { } @ConfigSerializable - private static class TestObject { + private static final class TestObject { @Setting("int") private int value; @Setting private String name; } diff --git a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java index 5e79b8aea..6a4cd405a 100644 --- a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java +++ b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java @@ -31,7 +31,7 @@ class GuiceObjectMapperTest { - private static class TestModule extends AbstractModule { + private static final class TestModule extends AbstractModule { @Override protected void configure() { this.bind(String.class).toInstance("test value"); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a4e2f433d..e2a90f3fa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] assertj="3.24.2" -autoValue="1.10.2" +autoValue="1.10.4" checkerQual="3.38.0" -checkstyle="10.12.1" +checkstyle="10.12.4" geantyref = "1.3.14" errorprone="2.21.1" indra = "3.1.3" @@ -19,7 +19,7 @@ autoValue = { module = "com.google.auto.value:auto-value", version.ref = "autoVa autoValue-annotations = { module = "com.google.auto.value:auto-value-annotations", version.ref = "autoValue" } errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" } errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" } -guava = "com.google.guava:guava:32.1.1-jre" +guava = "com.google.guava:guava:32.1.3-jre" junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" } stylecheck = "ca.stellardrift:stylecheck:0.2.1" @@ -46,11 +46,11 @@ guice-runtime = "com.google.inject:guice:5.0.1" # Formats gson = "com.google.code.gson:gson:2.8.0" # Fixed version, to avoid using API not present in older MC hocon = "com.typesafe:config:1.4.2" -jackson = "com.fasterxml.jackson.core:jackson-core:2.15.2" +jackson = "com.fasterxml.jackson.core:jackson-core:2.15.3" # Tool clikt = "com.github.ajalt:clikt:2.8.0" -jansi = "org.fusesource.jansi:jansi:2.4.0" +jansi = "org.fusesource.jansi:jansi:2.4.1" # Build build-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:3.1.0" @@ -58,7 +58,7 @@ build-forbiddenApis = "de.thetaphi:forbiddenapis:3.5.1" build-goomph = "com.diffplug.gradle:goomph:3.42.1" build-indra = { module = "net.kyori:indra-common", version.ref = "indra" } build-indra-crossdoc = { module = "net.kyori:indra-crossdoc", version.ref = "indra" } -build-japicmp-plugin = "me.champeau.gradle:japicmp-gradle-plugin:0.4.1" +build-japicmp-plugin = "me.champeau.gradle:japicmp-gradle-plugin:0.4.2" build-japicmp = { module = "com.github.siom79.japicmp:japicmp", version.require = "0.15.+" } build-nullaway = "net.ltgt.gradle:gradle-nullaway-plugin:1.6.0" build-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } diff --git a/tool/build.gradle b/tool/build.gradle index 0dc6f4009..b5ed208b6 100644 --- a/tool/build.gradle +++ b/tool/build.gradle @@ -1,5 +1,4 @@ import io.gitlab.arturbosch.detekt.Detekt -import kotlinx.coroutines.scheduling.TasksKt import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins {