This repository has been archived by the owner on May 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.sbt
80 lines (54 loc) · 2.32 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
lazy val commonSettings = Seq(
organization := "com.codecommit",
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/")),
scalaVersion := "2.11.7",
crossScalaVersions := Seq(scalaVersion.value),
shimsVersion := "0.3",
libraryDependencies += "org.specs2" %% "specs2-core" % "3.7" % "test",
addCompilerPlugin("org.spire-math" % "kind-projector" % "0.7.1" cross CrossVersion.binary),
scalacOptions += "-language:_", // I really can't be bothered with SIP-18
scalacOptions += "-Ybackend:GenBCode",
// scalacOptions += "-Xlog-implicits",
scalacOptions in Test += "-Yrangepos",
isSnapshot := version.value endsWith "SNAPSHOT", // so… sonatype doesn't like git hash snapshots
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
sonatypeProfileName := "com.codecommit",
pomExtra :=
<developers>
<developer>
<id>djspiewak</id>
<name>Daniel Spiewak</name>
<url>http://www.codecommit.com</url>
</developer>
<developer>
<id>alissapajer</id>
<name>Alissa Pajer</name>
</developer>
</developers>,
homepage := Some(url("https://github.com/djspiewak/emm")),
scmInfo := Some(ScmInfo(url("https://github.com/djspiewak/emm"),
"git@github.com:djspiewak/emm.git")))
lazy val root = project.in(file(".")).settings(commonSettings: _*).aggregate(core, cats, scalaz71, scalaz72).settings(
name := "emm",
publish := (),
publishLocal := (),
publishArtifact := false)
lazy val core = project.in(file("core")).settings(commonSettings: _*)
lazy val cats = project.in(file("cats")).settings(commonSettings: _*).dependsOn(core)
lazy val scalaz72 = project.in(file("scalaz72")).settings(commonSettings: _*).dependsOn(core)
lazy val scalaz71 = project.in(file("scalaz71")).settings(commonSettings: _*).dependsOn(core)
enablePlugins(GitVersioning)
val ReleaseTag = """^v([\d\.]+)$""".r
git.baseVersion := "0.2"
git.gitTagToVersionNumber := {
case ReleaseTag(version) => Some(version)
case _ => None
}
git.formattedShaVersion := {
val suffix = git.makeUncommittedSignifierSuffix(git.gitUncommittedChanges.value, git.uncommittedSignifier.value)
git.gitHeadCommit.value map { _.substring(0, 7) } map { sha =>
git.baseVersion.value + "-" + sha + suffix
}
}
git.gitUncommittedChanges := "git status -s".!!.trim.length > 0