-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
77 lines (69 loc) · 2.46 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
/*
* Copyright (C) 2022 Electronic Arts Inc. All rights reserved.
*/
import sbt._
val finagleVersion = "20.10.0"
val circeVersion = "0.14.1"
ThisBuild / credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
ThisBuild / envVars ++= Map("CI_PROJECT_DIR" -> sys.env.getOrElse("CI_PROJECT_DIR", "."))
ThisBuild / scalaVersion := "2.12.15"
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-parser-combinators" % VersionScheme.Always
ThisBuild / versionScheme := Some(VersionScheme.EarlySemVer)
lazy val sbtOps = sys.env
.get("SBT_OPTS")
.map(_.split(" "))
.getOrElse(Array.empty)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/electronicarts/kara")),
organization := "com.ea.kara",
licenses := Seq("The 3-Clause BSD License" -> url("http://opensource.org/licenses/BSD-3-Clause")),
publishMavenStyle := true,
publishTo := sonatypePublishToBundle.value,
scmInfo := Some(
ScmInfo(
url("https://github.com/electronicarts/kara"),
"scm:git:[email protected]:electornicarts/kara.git"
)
),
pomExtra :=
<developers>
<developer>
<name>Electronic Arts Inc.</name>
<url>https://ea.com</url>
</developer>
</developers>
)
lazy val root = (project in file("."))
.enablePlugins(ScriptedPlugin)
.settings(
publishSettings,
addSbtPlugin("com.twitter" % "scrooge-sbt-plugin" % finagleVersion),
libraryDependencies ++= Seq(
"commons-io" % "commons-io" % "2.8.0",
"org.scalatra.scalate" %% "scalate-core" % "1.9.7",
"com.twitter" %% "finagle-http" % finagleVersion % Test,
"io.circe" %% "circe-yaml" % circeVersion,
"com.github.pathikrit" %% "better-files" % "3.9.1",
"io.swagger.parser.v3" % "swagger-parser" % "2.0.21" % Test,
"org.scalatest" %% "scalatest" % "3.2.1" % Test,
),
scriptedLaunchOpts ++= Seq(
"-Xmx1024M",
"-Dplugin.version=" + version.value
) ++ sbtOps,
scriptedBufferLog := false,
name := "kara",
sbtPlugin := true
)
lazy val docs = project
.in(file("mdoc"))
.settings(
publish / skip := true,
mdocOut := file("."),
mdocVariables := Map(
"VERSION" -> version.value.stripSuffix("-SNAPSHOT")
)
)
.enablePlugins(MdocPlugin)
addCommandAlias("codecov", "; clean; reload; coverage; test; coverageReport; coverageAggregate; coverageOff")
addCommandAlias("fmt", "; scalafmtAll")