-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
35 lines (30 loc) · 1.23 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
scalaVersion := "2.13.14"
name := "gatling-enterprise-api"
organization := "io.gatling.enterprise"
autoScalaLibrary := false
crossPaths := false
enablePlugins(GatlingVersioningPlugin)
enablePlugins(GatlingBasicInfoPlugin)
enablePlugins(GatlingReleasePlugin)
enablePlugins(SmithyBuildPlugin)
libraryDependencies ++= Seq(
"com.disneystreaming.alloy" % "alloy-core" % "0.3.14"
)
Compile / compile := ((Compile / compile) dependsOn (Compile / smithyBuild)).value
Compile / packageBin / mappings := {
val defaultMappings = (Compile / packageBin / mappings).value
val smithyDirectory = (Compile / smithyOutputDir).value / "source" / "sources"
val smithyFiles = smithyDirectory ** "**" pair Path.rebase(smithyDirectory, "META-INF/smithy")
smithyFiles ++ defaultMappings
}
Compile / unmanagedSourceDirectories += sourceDirectory.value / "main" / "smithy"
lazy val openapi = (project in file("openapi"))
.enablePlugins(PreprocessPlugin)
.settings(
Preprocess / sourceDirectory := sourceDirectory.value / "main" / "openapi",
Preprocess / preprocessRules := Seq(
("API_URL_PLACEHOLDER".r, _ => "https://api.gatling.io")
),
Preprocess / preprocessIncludeFilter := "*.yaml",
Preprocess / target := target.value / "openapi"
)