-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from daddykotex/dfrancoeur/exclude
Add a list of excluded namespaces
- Loading branch information
Showing
7 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 25 additions & 6 deletions
31
modules/codegen-plugin/src/sbt-test/codegen-plugin/custom-settings/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
lazy val root = (project in file(".")) | ||
lazy val commonSettings = Def.settings( | ||
scalaVersion := "2.13.6", | ||
smithy4sInputDir in Compile := (baseDirectory in ThisBuild).value / "smithy_input", | ||
Compile / smithy4sAllowedNamespaces := List( | ||
"aws.iam", | ||
"smithy4s.example" | ||
), | ||
libraryDependencies += "com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value, | ||
libraryDependencies += "software.amazon.smithy" % "smithy-aws-iam-traits" % "1.14.1" % Smithy4s | ||
) | ||
|
||
lazy val p1 = project | ||
.enablePlugins(Smithy4sCodegenPlugin) | ||
.settings(commonSettings) | ||
.settings( | ||
scalaVersion := "2.13.6", | ||
smithy4sInputDir in Compile := (baseDirectory in ThisBuild).value / "smithy_input", | ||
smithy4sOutputDir in Compile := (baseDirectory in ThisBuild).value / "smithy_output", | ||
smithy4sOutputDir in Compile := baseDirectory.value / "smithy_output", | ||
Compile / smithy4sAllowedNamespaces := List( | ||
"aws.iam", | ||
"smithy4s.example" | ||
) | ||
) | ||
lazy val p2 = project | ||
.enablePlugins(Smithy4sCodegenPlugin) | ||
.settings(commonSettings) | ||
.settings( | ||
smithy4sOutputDir in Compile := baseDirectory.value / "smithy_output", | ||
Compile / smithy4sAllowedNamespaces := List( | ||
"aws.iam", | ||
"smithy4s.example" | ||
), | ||
libraryDependencies += "com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value, | ||
libraryDependencies += "software.amazon.smithy" % "smithy-aws-iam-traits" % "1.14.1" % "smithy4s" | ||
Compile / smithy4sExcludedNamespaces := List("smithy4s.toexclude") | ||
) |
6 changes: 6 additions & 0 deletions
6
...es/codegen-plugin/src/sbt-test/codegen-plugin/custom-settings/smithy_input/exclude.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace smithy4s.toexclude | ||
|
||
structure StructureToExclude { | ||
@required | ||
key: String | ||
} |
11 changes: 8 additions & 3 deletions
11
modules/codegen-plugin/src/sbt-test/codegen-plugin/custom-settings/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# check if smithy4sCodegen works | ||
> compile | ||
$ exists smithy_output/aws/iam/ActionPermissionDescription.scala | ||
$ exists smithy_output/smithy4s/example/ObjectService.scala | ||
> p1/compile | ||
$ exists p1/smithy_output/aws/iam/ActionPermissionDescription.scala | ||
$ exists p1/smithy_output/smithy4s/example/ObjectService.scala | ||
|
||
> p2/compile | ||
$ exists p2/smithy_output/aws/iam/ActionPermissionDescription.scala | ||
$ exists p2/smithy_output/smithy4s/example/ObjectService.scala | ||
-$ exists p2/smithy_output/smithy4s/toexclude/StructureToExclude.scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters