forked from xiaodongw/swagger-finatra
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.sbt
81 lines (74 loc) · 3.12 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
inThisBuild(List(
scalaVersion := "2.13.8",
crossScalaVersions := Seq("2.12.12", "2.13.8"),
organization := "com.jakehschwartz",
homepage := Some(url("https://github.com/jakehschwartz/finatra-swagger")),
licenses := List("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(id="jakehschwartz", name="Jake Schwartz", email="[email protected]", url=url("https://www.jakehschwartz.com")),
Developer(id="xiaodongw", name="Xiaodong Wang", email="[email protected]", url=url("https://github.com/xiaodongw"))
),
))
lazy val swaggerUIVersion = SettingKey[String]("swaggerUIVersion")
lazy val finatraSwagger = project
.in(file("."))
.settings(settings: _*)
.settings(Seq(
name := "finatra-swagger",
swaggerUIVersion := "5.17.2",
buildInfoPackage := "com.jakehschwartz.finatra.swagger",
buildInfoKeys := Seq[BuildInfoKey](name, version, swaggerUIVersion),
libraryDependencies ++= Seq(
"com.twitter" %% "finatra-http-server" % twitterReleaseVersion,
"io.swagger.core.v3" % "swagger-project" % "2.2.21",
"com.github.swagger-akka-http" %% "swagger-scala-module" % "2.10.0",
"com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % jacksonVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion,
"org.webjars" % "swagger-ui" % swaggerUIVersion.value,
"net.bytebuddy" % "byte-buddy" % "1.14.14"
) ++ testLibs
))
.settings(settings: _*)
.enablePlugins(BuildInfoPlugin)
lazy val examples = Project("hello-world-example", file("examples/hello-world"))
.settings(Seq(
name := "examples",
libraryDependencies ++= testLibs,
))
.settings(settings: _*)
.settings(publish / skip := true)
.dependsOn(finatraSwagger)
lazy val settings: Seq[sbt.Def.SettingsDefinition] = Seq(
resolvers ++= Seq(
"Local Ivy" at "file:///"+Path.userHome+"/.ivy2/local",
"Local Ivy Cache" at "file:///"+Path.userHome+"/.ivy2/cache",
"Local Maven Repository" at "file:///"+Path.userHome+"/.m2/repository"
),
Test / parallelExecution := true,
testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oDF"),
javaOptions ++= Seq(
"-Xss8M",
"-Xms512M",
"-Xmx2G"
),
Test / javaOptions ++= Seq(
"-Dlog.service.output=/dev/stdout",
"-Dlog.access.output=/dev/stdout",
"-Dlog_level=DEBUG"
)
)
lazy val twitterReleaseVersion = "24.2.0"
lazy val jacksonVersion = "2.14.3"
val testLibs = Seq(
"com.twitter" %% "finatra-http-server" % twitterReleaseVersion % "test" classifier "tests",
"com.twitter" %% "inject-app" % twitterReleaseVersion % "test" classifier "tests",
"com.twitter" %% "inject-core" % twitterReleaseVersion % "test" classifier "tests",
"com.twitter" %% "inject-modules" % twitterReleaseVersion % "test" classifier "tests",
"com.twitter" %% "inject-server" % twitterReleaseVersion % "test" classifier "tests",
"ch.qos.logback" % "logback-classic" % "1.2.12",
"org.scalatest" %% "scalatest" % "3.2.18" % "test",
"org.mockito" %% "mockito-scala" % "1.17.31" % "test"
)
val exampleLibs = Seq(
"com.jakehschwartz" %% "finatra-swagger" % twitterReleaseVersion,
)