Skip to content

Commit

Permalink
Added scripted test for protobuf generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Baccata committed Mar 12, 2024
1 parent a06eec3 commit 19332bf
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
lazy val root = (project in file("."))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
scalaVersion := "2.13.10",
libraryDependencies ++= Seq(
"com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.8.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sys.props.get("plugin.version") match {
case Some(x) =>
addSbtPlugin("com.disneystreaming.smithy4s" % "smithy4s-sbt-codegen" % x)
case _ =>
sys.error(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$version: "2"

namespace foo

use alloy.proto#protoEnabled

@protoEnabled
structure Foo {
a: String
b: Integer
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
> compile

# Protobuf source created
-$ exists target/scala-2.13/resources_managed/foo/foo.proto

0 comments on commit 19332bf

Please sign in to comment.