diff --git a/crac-plugin/src/main/java/io/micronaut/gradle/crac/CRaCCheckpointDockerfile.java b/crac-plugin/src/main/java/io/micronaut/gradle/crac/CRaCCheckpointDockerfile.java index 79cae9d2..28d497aa 100644 --- a/crac-plugin/src/main/java/io/micronaut/gradle/crac/CRaCCheckpointDockerfile.java +++ b/crac-plugin/src/main/java/io/micronaut/gradle/crac/CRaCCheckpointDockerfile.java @@ -16,7 +16,6 @@ import org.gradle.api.tasks.TaskAction; import org.gradle.jvm.toolchain.JavaLanguageVersion; -import java.io.IOException; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; diff --git a/crac-plugin/src/main/java/io/micronaut/gradle/crac/TeeStringWriter.java b/crac-plugin/src/main/java/io/micronaut/gradle/crac/TeeStringWriter.java index dfaff3d8..c8b0018d 100644 --- a/crac-plugin/src/main/java/io/micronaut/gradle/crac/TeeStringWriter.java +++ b/crac-plugin/src/main/java/io/micronaut/gradle/crac/TeeStringWriter.java @@ -18,13 +18,13 @@ public TeeStringWriter(Logger logger) { @Override @SuppressWarnings("java:S2629") // This is done by Gradle - public void write(char[] cbuf, int off, int len) throws IOException { + public void write(char[] cbuf, int off, int len) { delegate.write(cbuf, off, len); logger.lifecycle(new String(cbuf, off, len).trim()); } @Override - public void flush() throws IOException { + public void flush() { delegate.flush(); } diff --git a/docker-plugin/src/main/java/io/micronaut/gradle/docker/MicronautDockerfile.java b/docker-plugin/src/main/java/io/micronaut/gradle/docker/MicronautDockerfile.java index 0c8e82a6..a9a5d95c 100644 --- a/docker-plugin/src/main/java/io/micronaut/gradle/docker/MicronautDockerfile.java +++ b/docker-plugin/src/main/java/io/micronaut/gradle/docker/MicronautDockerfile.java @@ -54,6 +54,7 @@ public MicronautDockerfile() { this.targetWorkingDirectory = objects.property(String.class).convention(DEFAULT_WORKING_DIR); } + @Override public Property getTargetWorkingDirectory() { return targetWorkingDirectory; } diff --git a/docker-plugin/src/main/java/io/micronaut/gradle/docker/NativeImageDockerfile.java b/docker-plugin/src/main/java/io/micronaut/gradle/docker/NativeImageDockerfile.java index 55a4f800..bc4c90e0 100644 --- a/docker-plugin/src/main/java/io/micronaut/gradle/docker/NativeImageDockerfile.java +++ b/docker-plugin/src/main/java/io/micronaut/gradle/docker/NativeImageDockerfile.java @@ -86,15 +86,18 @@ public abstract class NativeImageDockerfile extends Dockerfile implements Docker */ @Input @Optional + @Override public abstract Property getBaseImage(); /** * @return The arguments to pass to the native image executable when starting up in the docker container. */ @Input + @Override public abstract ListProperty getArgs(); @Input + @Override public abstract ListProperty getExposedPorts(); /** @@ -117,6 +120,7 @@ public abstract class NativeImageDockerfile extends Dockerfile implements Docker @Input @Optional + @Override public abstract Property getDefaultCommand(); /** diff --git a/docker-plugin/src/main/java/io/micronaut/gradle/docker/editor/FingerprintingEditor.java b/docker-plugin/src/main/java/io/micronaut/gradle/docker/editor/FingerprintingEditor.java index 83d7c7ff..10750e46 100644 --- a/docker-plugin/src/main/java/io/micronaut/gradle/docker/editor/FingerprintingEditor.java +++ b/docker-plugin/src/main/java/io/micronaut/gradle/docker/editor/FingerprintingEditor.java @@ -31,7 +31,6 @@ public class FingerprintingEditor implements Editor { private final List fingerprint; // We use Optional because Gradle doesn't support injecting null values - @SuppressWarnings("OptionalUsedAsFieldOrParameterType") @Inject public FingerprintingEditor(ObjectFactory objects, List fingerprint) { diff --git a/docker-plugin/src/main/java/io/micronaut/gradle/docker/tasks/PrepareDockerContext.java b/docker-plugin/src/main/java/io/micronaut/gradle/docker/tasks/PrepareDockerContext.java index bdd29464..4c6eb149 100644 --- a/docker-plugin/src/main/java/io/micronaut/gradle/docker/tasks/PrepareDockerContext.java +++ b/docker-plugin/src/main/java/io/micronaut/gradle/docker/tasks/PrepareDockerContext.java @@ -29,10 +29,10 @@ /** * Prepares a docker build context directory by copying a number of * directories into the output directory. - * + *

* We cannot use the regular Copy task because of laziness and the * fact that the directories to copy are generated by the build itself. - * + *

* However, using `Copy` task is considered harmful in general. */ public abstract class PrepareDockerContext extends DefaultTask { diff --git a/functional-tests/src/test/groovy/io/micronaut/gradle/kotlin/KotlinLibraryFunctionalTest.groovy b/functional-tests/src/test/groovy/io/micronaut/gradle/kotlin/KotlinLibraryFunctionalTest.groovy index 489c031c..f1101dfa 100644 --- a/functional-tests/src/test/groovy/io/micronaut/gradle/kotlin/KotlinLibraryFunctionalTest.groovy +++ b/functional-tests/src/test/groovy/io/micronaut/gradle/kotlin/KotlinLibraryFunctionalTest.groovy @@ -7,10 +7,10 @@ import spock.lang.Shared class KotlinLibraryFunctionalTest extends AbstractEagerConfiguringFunctionalTest { @Shared - private final String kotlinVersion = System.getProperty("kotlinVersion"); + private final String kotlinVersion = System.getProperty("kotlinVersion") @Shared - private final String kspVersion = System.getProperty("kspVersion"); + private final String kspVersion = System.getProperty("kspVersion") def "test apply defaults for micronaut-library and KSP with kotlin DSL for #plugin"() { diff --git a/minimal-plugin/src/main/java/io/micronaut/gradle/AnnotationProcessingConfigBuilder.java b/minimal-plugin/src/main/java/io/micronaut/gradle/AnnotationProcessingConfigBuilder.java index a0a6ecc5..b045fb6f 100644 --- a/minimal-plugin/src/main/java/io/micronaut/gradle/AnnotationProcessingConfigBuilder.java +++ b/minimal-plugin/src/main/java/io/micronaut/gradle/AnnotationProcessingConfigBuilder.java @@ -1,6 +1,5 @@ package io.micronaut.gradle; -import org.gradle.api.artifacts.Configuration; import org.gradle.api.tasks.SourceSet; /** diff --git a/minimal-plugin/src/main/java/io/micronaut/gradle/AttributeUtils.java b/minimal-plugin/src/main/java/io/micronaut/gradle/AttributeUtils.java index bb6317bc..ddb08247 100644 --- a/minimal-plugin/src/main/java/io/micronaut/gradle/AttributeUtils.java +++ b/minimal-plugin/src/main/java/io/micronaut/gradle/AttributeUtils.java @@ -40,7 +40,7 @@ public static void copyAttributes(ProviderFactory providers, Configuration from, AttributeContainer runtimeClasspathAttributes = to.getAttributes(); Set> keySet = runtimeClasspathAttributes.keySet(); for (Attribute attribute : keySet) { - //noinspection unchecked,DataFlowIssue + // noinspection unchecked attrs.attributeProvider((Attribute) attribute, providers.provider(() -> runtimeClasspathAttributes.getAttribute(attribute))); } }); diff --git a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java index a51847fa..1c8d853c 100644 --- a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java +++ b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiClientWorkAction.java @@ -34,6 +34,7 @@ interface ClientParameters extends AbstractOpenApiWorkAction.OpenApiParameters { ListProperty getAdditionalClientTypeAnnotations(); } + @Override protected void configureBuilder(MicronautCodeGeneratorBuilder builder) { var parameters = getParameters(); builder.forClient(spec -> { diff --git a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java index 5a25b2b2..5d831b30 100644 --- a/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java +++ b/openapi-plugin/src/main/java/io/micronaut/gradle/openapi/tasks/OpenApiServerWorkAction.java @@ -25,6 +25,7 @@ interface ServerParameters extends OpenApiParameters { Property getUseAuth(); } + @Override protected void configureBuilder(MicronautCodeGeneratorBuilder builder) { var parameters = getParameters(); builder.forServer(spec -> { diff --git a/openapi-plugin/src/test/resources/petstore.json b/openapi-plugin/src/test/resources/petstore.json index ad552318..d51aa2fc 100644 --- a/openapi-plugin/src/test/resources/petstore.json +++ b/openapi-plugin/src/test/resources/petstore.json @@ -812,7 +812,7 @@ }, "petstore_auth": { "type": "oauth2", - "authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog", + "authorizationUrl": "https://petstore.swagger.io/api/oauth/dialog", "flow": "implicit", "scopes": { "write:pets": "modify pets in your account", diff --git a/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/MicronautTestResourcesPlugin.java b/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/MicronautTestResourcesPlugin.java index 5d3e7a8e..a5bc39ea 100644 --- a/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/MicronautTestResourcesPlugin.java +++ b/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/MicronautTestResourcesPlugin.java @@ -94,6 +94,7 @@ private static Configuration createTestResourcesClientConfiguration(Project proj return client; } + @Override public void apply(Project project) { PluginManager pluginManager = project.getPluginManager(); pluginManager.apply(JavaPlugin.class); diff --git a/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/TestResourcesConfiguration.java b/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/TestResourcesConfiguration.java index 40397733..534c19b7 100644 --- a/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/TestResourcesConfiguration.java +++ b/test-resources-plugin/src/main/java/io/micronaut/gradle/testresources/TestResourcesConfiguration.java @@ -46,7 +46,7 @@ public interface TestResourcesConfiguration extends KnownModules { * reuse that server, effectively ignoring the * existing configuration. This can be used to share * a server between multiple independent builds. - * + *

* If an explicit port is set, then security is lowered * and a token is no longer requested. Any client from * the loopback address can access the server.