forked from iheartradio/ficus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
76 lines (58 loc) · 2.15 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
import sbtrelease.Version
/* basic project info */
name := "ficus"
description := "A Scala-friendly wrapper companion for Typesafe config"
startYear := Some(2013)
/* scala versions and options */
scalaVersion := "2.11.8"
crossScalaVersions := Seq(scalaVersion.value, "2.10.6", "2.12.0")
// These options will be used for *all* versions.
scalacOptions ++= Seq(
"-feature",
"-deprecation",
"-unchecked",
"-encoding", "UTF-8",
"-target:jvm-1." + {
CrossVersion.partialVersion(scalaVersion.value).collect {
case (2, minor) if minor <= 10 => "7"
}.getOrElse("8")
}
) ++ (if (scalaVersion.value.startsWith("2.11") || scalaVersion.value.startsWith("2.10")) Seq("-Yclosure-elim", "-Yinline") else Seq.empty[String])
javacOptions ++= Seq(
"-Xlint:unchecked", "-Xlint:deprecation"
)
/* dependencies */
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "3.8.6" % "test",
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
"com.chuusai" %% "shapeless" % "2.3.2" % "test",
"com.typesafe" % "config" % "1.3.1",
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided",
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided",
"org.typelevel" %% "macro-compat" % "1.1.1",
compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
)
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.bintrayRepo("iheartradio","maven"),
Resolver.jcenterRepo
)
parallelExecution in Test := true
/* sbt behavior */
logLevel in compile := Level.Warn
traceLevel := 5
offline := false
mappings in (Compile, packageBin) := {
val ms = mappings.in(Compile, packageBin).value
ms filter { case (_, toPath) =>
toPath != "application.conf"
}
}
Publish.settings
releaseCrossBuild := true
mimaPreviousArtifacts :=
Version(version.value).collect {
case Version(major, (minor :: bugfix :: _), _) if (scalaBinaryVersion.value != "2.10") && bugfix > 0 =>
Set(organization.value %% name.value % Seq(major, minor, bugfix - 1).mkString("."))
}.getOrElse(Set.empty)