-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sbt
73 lines (59 loc) · 1.97 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
enablePlugins(SbtPlugin)
name := "sbt-guardrail"
ThisBuild / organization := "dev.guardrail"
description := "Principled code generation from OpenAPI specifications, sbt plugin"
ThisBuild / homepage := Some(url("https://github.com/guardrail-dev/sbt-guardrail"))
ThisBuild / licenses += ("MIT", url("https://github.com/guardrail-dev/guardrail/blob/master/LICENSE"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/guardrail-dev/sbt-guardrail"),
"scm:[email protected]:guardrail-dev/sbt-guardrail.git"
)
)
ThisBuild / developers := List(
Developer(
id = "blast_hardcheese",
name = "Devon Stewart",
email = "[email protected]",
url = url("http://hardchee.se/")
)
)
ThisBuild / scalaVersion := "2.12.18"
ThisBuild / scalacOptions ++= List("-feature", "-Xexperimental")
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"org.scalacheck" %% "scalacheck" % "1.17.0" % Test,
"org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test
)
// Versioning
enablePlugins(GitBranchPrompt)
enablePlugins(GitVersioning)
git.useGitDescribe := true
git.gitDescribedVersion := git.gitDescribedVersion(v => {
import scala.sys.process._
val nativeGitDescribeResult = ("git describe --tags --always HEAD" !!).trim
git.defaultTagByVersionStrategy(nativeGitDescribeResult)
}).value
git.gitUncommittedChanges := git.gitCurrentTags.value.isEmpty
val commonSettings = Seq(
// Release
publishMavenStyle := true,
sonatypeCredentialHost := "s01.oss.sonatype.org",
evictionErrorLevel := Level.Debug
)
scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}
scriptedDependencies := {
Def.sequential(
(Test / Keys.compile),
(publishLocal),
(core/publishLocal)
).value
}
lazy val root = (project in file("."))
.settings(commonSettings)
.dependsOn(core)
.aggregate(core)
lazy val core = (project in file("modules/core"))
.settings(commonSettings)