-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
62 lines (44 loc) · 1.67 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
name := "scala-pool"
organization := "io.github.andrebeat"
startYear := Some(2015)
version := "0.5.0-SNAPSHOT"
scalaVersion := "2.13.1"
crossScalaVersions := Seq("2.12.10", "2.11.12")
libraryDependencies ++= Seq(
"org.specs2" %% "specs2-core" % "4.8.1" % "test")
resolvers ++= Seq(
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"releases" at "https://oss.sonatype.org/content/repositories/releases",
"Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/")
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions")
val javaVersion = settingKey[String]("Java version")
javaVersion := System.getProperty("java.version")
unmanagedSourceDirectories in Compile += {
val v = javaVersion.value
val dir = (sourceDirectory in Compile).value
if (v.startsWith("1.7.")) dir / "java_7"
else dir / "java_8"
}
scalacOptions in Test ++= Seq("-Yrangepos")
fork := true
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging)
pomIncludeRepository := { _ => false }
publishArtifact in Test := false
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
import scalariform.formatter.preferences._
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true)
enablePlugins(SiteScaladocPlugin)
enablePlugins(GhpagesPlugin)
git.remoteRepo := s"""https://${sys.env.getOrElse("GH_TOKEN", "NULL")}@github.com/andresilva/scala-pool.git"""