diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts new file mode 100644 index 000000000..01779a62e --- /dev/null +++ b/bom/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + `java-platform` + id("smithy-java.publishing-conventions") +} + +description = "Smithy Java BOM (Bill of Materials) for dependency version management" + +extra["displayName"] = "Smithy :: Java :: BOM" + +configurePublishing { + customComponent = components["javaPlatform"] +} + +// Auto-discover all published subprojects (those with maven-publish plugin) +// and add them as BOM constraints. +gradle.projectsEvaluated { + dependencies { + constraints { + rootProject.subprojects + .filter { it != project && it.plugins.hasPlugin("maven-publish") } + .sortedBy { it.path } + .forEach { api(it) } + } + } +} \ No newline at end of file diff --git a/codegen/codegen-plugin/build.gradle.kts b/codegen/codegen-plugin/build.gradle.kts index c5d4fa634..573bed6c3 100644 --- a/codegen/codegen-plugin/build.gradle.kts +++ b/codegen/codegen-plugin/build.gradle.kts @@ -24,7 +24,6 @@ dependencies { testImplementation(project(":aws:client:aws-client-restjson")) testImplementation(libs.smithy.aws.traits) testImplementation(libs.smithy.rules) - testImplementation(project(":codegen:test-utils")) testImplementation(libs.jspecify) // Integration test deps diff --git a/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/types/TypesCodegenPluginTest.java b/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/types/TypesCodegenPluginTest.java index 11b11e5a1..bfcf0bc57 100644 --- a/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/types/TypesCodegenPluginTest.java +++ b/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/types/TypesCodegenPluginTest.java @@ -6,12 +6,12 @@ package software.amazon.smithy.java.codegen.types; import static org.assertj.core.api.Assertions.assertThat; -import static software.amazon.smithy.java.codegen.test.PluginTestRunner.addTestCasesFromUrl; +import static software.amazon.smithy.java.codegen.utils.PluginTestRunner.addTestCasesFromUrl; import java.util.Collection; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import software.amazon.smithy.java.codegen.test.PluginTestRunner.TestCase; +import software.amazon.smithy.java.codegen.utils.PluginTestRunner.TestCase; public class TypesCodegenPluginTest { diff --git a/codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/PluginTestRunner.java b/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/utils/PluginTestRunner.java similarity index 99% rename from codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/PluginTestRunner.java rename to codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/utils/PluginTestRunner.java index 46b9fd209..0bd9c18be 100644 --- a/codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/PluginTestRunner.java +++ b/codegen/codegen-plugin/src/test/java/software/amazon/smithy/java/codegen/utils/PluginTestRunner.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.java.codegen.test; +package software.amazon.smithy.java.codegen.utils; import java.io.File; import java.io.IOException; diff --git a/codegen/test-utils/README.md b/codegen/test-utils/README.md deleted file mode 100644 index cf6b97750..000000000 --- a/codegen/test-utils/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## codegen-test-utils - -> [!WARNING] -> This is a developer-preview module and may contain bugs. No guarantee is made about API stability. -> This module is not recommended for production use. - -Provides utilities for testing Smithy Java codegen plugins. diff --git a/codegen/test-utils/build.gradle.kts b/codegen/test-utils/build.gradle.kts deleted file mode 100644 index 700da3634..000000000 --- a/codegen/test-utils/build.gradle.kts +++ /dev/null @@ -1,15 +0,0 @@ - -plugins { - id("smithy-java.module-conventions") -} - -description = "This module provides utilities for testing codegen plugins" - -extra["displayName"] = "Smithy :: Java :: Codegen :: Test" -extra["moduleName"] = "software.amazon.smithy.java.codegen.test" - -dependencies { - implementation(libs.smithy.codegen) - api(platform(libs.junit.bom)) - api(libs.junit.jupiter.api) -} diff --git a/codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/package-info.java b/codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/package-info.java deleted file mode 100644 index 3b000e288..000000000 --- a/codegen/test-utils/src/main/java/software/amazon/smithy/java/codegen/test/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Test utilities for codegen plugins. - *
This package is under development and is not intended for use in production. - */ -@SmithyUnstableApi -package software.amazon.smithy.java.codegen.test; - -import software.amazon.smithy.utils.SmithyUnstableApi; diff --git a/fuzz-test-harness/build.gradle.kts b/fuzz-test-harness/build.gradle.kts index 0a7e5df90..f6beeda99 100644 --- a/fuzz-test-harness/build.gradle.kts +++ b/fuzz-test-harness/build.gradle.kts @@ -1,13 +1,11 @@ plugins { - id("smithy-java.module-conventions") + id("smithy-java.java-conventions") + id("smithy-java.integ-test-conventions") id("software.amazon.smithy.gradle.smithy-base") } description = "This module provides a test harness and tools for fuzzing Smithy codecs using Jazzer." -extra["displayName"] = "Smithy :: Java :: Fuzz Test Harness" -extra["moduleName"] = "software.amazon.smithy.java.fuzz" - dependencies { smithyBuild(project(":codegen:codegen-plugin")) @@ -45,10 +43,6 @@ tasks.named("compileJava") { dependsOn("smithyBuild") } -tasks.sourcesJar { - mustRunAfter("compileJava") -} - tasks.processResources { dependsOn("compileJava") } diff --git a/protocol-test-harness/build.gradle.kts b/protocol-test-harness/build.gradle.kts index bf35d7522..2f15acb9e 100644 --- a/protocol-test-harness/build.gradle.kts +++ b/protocol-test-harness/build.gradle.kts @@ -1,14 +1,12 @@ plugins { - id("smithy-java.module-conventions") + id("smithy-java.java-conventions") + id("smithy-java.integ-test-conventions") } description = "This module provides a test harness and tools for executing protocol tests." -extra["displayName"] = "Smithy :: Java :: Protocol Tests" -extra["moduleName"] = "software.amazon.smithy.java.protocoltests" - dependencies { implementation(project(":logging")) implementation(project(":codegen:codegen-plugin")) diff --git a/settings.gradle.kts b/settings.gradle.kts index 47ce7b7dd..f5137d7a7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,6 +9,9 @@ pluginManagement { rootProject.name = "smithy-java" +// BOM (Bill of Materials) +include(":bom") + // AI include(":smithy-ai-traits") @@ -57,7 +60,6 @@ include(":server:server-proxy") // Codegen include(":codegen:codegen-core") include(":codegen:codegen-plugin") -include(":codegen:test-utils") // Utilities include(":jmespath")