-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
61 lines (55 loc) · 1.63 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import eu.unicredit.swagger.dependencies._
import eu.unicredit.swagger.generators.DefaultAsyncServerGenerator
lazy val common = Seq(
organization := "eu.unicredit",
scalaVersion := "2.12.8",
version := "0.1.0-SNAPSHOT",
scalacOptions ++= Seq(
"-feature",
"-language:postfixOps"),
libraryDependencies ++=
Dependencies(DefaultModelGenerator.dependencies) ++
Dependencies(DefaultJsonGenerator.dependencies)
)
lazy val commonServer = Seq(
swaggerCodeProvidedPackage := "eu.unicredit",
swaggerGenerateServer := true,
libraryDependencies ++=
guice +:
Dependencies(DefaultServerGenerator.dependencies)
)
lazy val server = project.
in(file("server")).
settings(common: _*).
settings(commonServer: _*).
settings(
name := "codegen-server"
)
.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.enablePlugins(SwaggerCodegenPlugin)
lazy val serverAsync = project.
in(file("server-async")).
settings(common: _*).
settings(commonServer: _*).
settings(
name := "codegen-server-async",
swaggerServerCodeGenClass := new DefaultAsyncServerGenerator()
)
.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.enablePlugins(SwaggerCodegenPlugin)
lazy val client = project.
in(file("client")).
settings(common: _*).
settings(
name := "codegen-client",
swaggerGenerateClient := true,
libraryDependencies ++=
guice +:
Dependencies(DefaultClientGenerator.dependencies)
)
.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.enablePlugins(SwaggerCodegenPlugin)
lazy val root = project.in(file(".")).aggregate(server, serverAsync, client)