diff --git a/build.sbt b/build.sbt index 59df191b..8fab65bd 100644 --- a/build.sbt +++ b/build.sbt @@ -136,6 +136,25 @@ lazy val formatter = module("formatter") parser % "test->test", ) +lazy val examples = module("examples") + .settings( + libraryDependencies ++= Seq( + "com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value, + "com.disneystreaming.smithy4s" %% "smithy4s-aws-kernel" % smithy4sVersion.value, + ), + publish := false, + ) + .enablePlugins(Smithy4sCodegenPlugin) + +// not named "protocol" to leave space for a potential java-only protocol jav +lazy val protocol4s = module("protocol4s") + .settings( + libraryDependencies ++= Seq( + "com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value + ) + ) + .enablePlugins(Smithy4sCodegenPlugin) + // Most of the core functionality of SmithyQL (compilation, analysis, evaluation) // also: SmithyQL standard library lazy val core = module("core") @@ -149,12 +168,11 @@ lazy val core = module("core") "com.disneystreaming.smithy4s" % "smithy4s-protocol" % smithy4sVersion.value % Test, "com.disneystreaming.alloy" % "alloy-core" % "0.3.14" % Test, "software.amazon.smithy" % "smithy-aws-traits" % "1.52.1" % Test, - ), - // todo: move this to a separate module like "examples" - Smithy4sCodegenPlugin.defaultSettings(Test), + ) ) - .enablePlugins(Smithy4sCodegenPlugin) .dependsOn( + protocol4s, + examples % "test->compile", pluginCore, ast, source % "test->test;compile->compile", @@ -228,10 +246,12 @@ lazy val root = project ast, source, core, + examples, parser, formatter, languageSupport, lsp, + protocol4s, pluginCore, pluginSample, e2e, diff --git a/modules/core/src/test/scala/demo/smithy/InstantProvider.scala b/modules/examples/src/main/scala/demo/smithy/InstantProvider.scala similarity index 100% rename from modules/core/src/test/scala/demo/smithy/InstantProvider.scala rename to modules/examples/src/main/scala/demo/smithy/InstantProvider.scala diff --git a/modules/core/src/test/smithy/demo.smithy b/modules/examples/src/main/smithy/demo.smithy similarity index 100% rename from modules/core/src/test/smithy/demo.smithy rename to modules/examples/src/main/smithy/demo.smithy diff --git a/modules/core/src/test/smithy/fake_aws.smithy b/modules/examples/src/main/smithy/fake_aws.smithy similarity index 100% rename from modules/core/src/test/smithy/fake_aws.smithy rename to modules/examples/src/main/smithy/fake_aws.smithy diff --git a/modules/core/src/test/smithy/noop.smithy b/modules/examples/src/main/smithy/noop.smithy similarity index 100% rename from modules/core/src/test/smithy/noop.smithy rename to modules/examples/src/main/smithy/noop.smithy diff --git a/modules/core/src/main/smithy/std.smithy b/modules/protocol4s/src/main/smithy/std.smithy similarity index 100% rename from modules/core/src/main/smithy/std.smithy rename to modules/protocol4s/src/main/smithy/std.smithy