forked from atais/Fixed-Length
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
56 lines (45 loc) · 1.55 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
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
// main dependencies
lazy val shapeless = "com.chuusai" %% "shapeless" % "2.3.2"
lazy val shapelessMacros = compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
lazy val cats = "org.typelevel" %% "cats-core" % "1.1.0"
// test dependencies
lazy val scalatest = "org.scalatest" %% "scalatest" % "3.0.1" % Test
lazy val scalacheck = "org.scalacheck" %% "scalacheck" % "1.13.4" % Test
lazy val main = (project in file("."))
.settings(
name := "fixed-length",
organization := "com.github.atais",
scalaVersion := "2.10.6",
crossScalaVersions := Seq("2.10.6", "2.11.8", "2.12.2"),
// dependencies
libraryDependencies ++= Seq(
shapeless,
cats,
scalatest,
scalacheck
),
libraryDependencies ++= (if (scalaBinaryVersion.value startsWith "2.10") Seq(shapelessMacros) else Nil),
// release settings
releaseCrossBuild := true,
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
)