Apply to all java modules, usually excluding the root project in multi-module sets.
*
- *
Version: 1.9
+ *
Versions:
+ * - 1.10: Add ability to exclude containerised tests
* - 1.9: Add `allDeps` task.
* - 1.8: Tweak test config to reduce build speed.
* - 1.7: Switch to setting Java version via toolchain
@@ -70,7 +71,12 @@ tasks.withType {
}
tasks.test {
- useJUnitPlatform()
+ useJUnitPlatform() {
+ if (project.hasProperty("excludeContainerised")) {
+ excludeTags("ContainerisedTest")
+ }
+ }
+
setForkEvery(5)
maxParallelForks = Runtime.getRuntime().availableProcessors()
testLogging {
diff --git a/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts
index 8196620..b3d048f 100644
--- a/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts
+++ b/buildSrc/src/main/kotlin/creek-plugin-publishing-convention.gradle.kts
@@ -95,9 +95,9 @@ publishing {
name.set("${project.group}:${artifactId}")
if (prependRootName) {
- description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
+ description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
- description.set("${project.name.capitalize()} library".replace("-", " "))
+ description.set("${project.name} library".replace("-", " "))
}
url.set("https://www.creekservice.org")
diff --git a/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts b/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts
index f7c5fb4..ebb7f27 100644
--- a/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts
+++ b/buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts
@@ -78,9 +78,9 @@ publishing {
name.set("${project.group}:${artifactId}")
if (prependRootName) {
- description.set("${rootProject.name.capitalize()} ${project.name} library".replace("-", " "))
+ description.set("${rootProject.name} ${project.name} library".replace("-", " "))
} else {
- description.set("${project.name.capitalize()} library".replace("-", " "))
+ description.set("${project.name} library".replace("-", " "))
}
url.set("https://www.creekservice.org")
diff --git a/config/spotbugs/suppressions.xml b/config/spotbugs/suppressions.xml
index 116ee98..c51071a 100644
--- a/config/spotbugs/suppressions.xml
+++ b/config/spotbugs/suppressions.xml
@@ -8,4 +8,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/metadata/src/main/java/org/creekservice/api/platform/metadata/ResourceHandler.java b/metadata/src/main/java/org/creekservice/api/platform/metadata/ResourceHandler.java
deleted file mode 100644
index ffc888c..0000000
--- a/metadata/src/main/java/org/creekservice/api/platform/metadata/ResourceHandler.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2022-2023 Creek Contributors (https://github.com/creek-service)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.creekservice.api.platform.metadata;
-
-import java.util.Collection;
-
-/**
- * A Callback that Creek extensions implement to handler the resource types they support.
- *
- * @param the specific resource type the handler handles.
- */
-public interface ResourceHandler {
-
- /**
- * Ensure the supplied {@code resources} exists.
- *
- *
Instructs an extension to ensure the resources described by the supplied descriptor exist
- * and are initialized.
- *
- *
Implementations should consider outputting a warning or failing if the resource already
- * exists, but does not match the expected configuration.
- *
- * @param resources the resource instances to ensure exists and are initialized. Resources
- * passed will be {@link ResourceDescriptor#isCreatable creatable}.
- */
- void ensure(Collection extends T> resources);
-}
diff --git a/resource/src/main/java/org/creekservice/api/platform/resource/ResourceInitializer.java b/resource/src/main/java/org/creekservice/api/platform/resource/ResourceInitializer.java
index 4e7f45c..7c7ea5a 100644
--- a/resource/src/main/java/org/creekservice/api/platform/resource/ResourceInitializer.java
+++ b/resource/src/main/java/org/creekservice/api/platform/resource/ResourceInitializer.java
@@ -36,8 +36,8 @@
import org.creekservice.api.observability.logging.structured.StructuredLogger;
import org.creekservice.api.observability.logging.structured.StructuredLoggerFactory;
import org.creekservice.api.platform.metadata.ComponentDescriptor;
+import org.creekservice.api.platform.metadata.OwnedResource;
import org.creekservice.api.platform.metadata.ResourceDescriptor;
-import org.creekservice.api.platform.metadata.ResourceHandler;
import org.creekservice.internal.platform.resource.ComponentValidator;
/**
@@ -58,38 +58,42 @@ public final class ResourceInitializer {
private static final StructuredLogger LOGGER =
StructuredLoggerFactory.internalLogger(ResourceInitializer.class);
- private final ResourceHandlers handlers;
+ private final ResourceCreator resourceCreator;
private final ComponentValidator componentValidator;
- /** Type for retrieving resource handlers */
+ /** Type for ensuring external resources exist */
@FunctionalInterface
- public interface ResourceHandlers {
+ public interface ResourceCreator {
/**
- * Get the handler for a specific type
+ * Get the handler for a specific type.
*
- * @param type the type
- * @param the type
- * @return the handler
+ *