forked from justwrote/scala-faker
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
63 lines (51 loc) · 2.02 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
import sbt._
import Keys._
import sbtrelease.ReleasePlugin._
lazy val scalaFaker = (project in file("."))
.settings(
name := "scala-faker",
organization := "it.bitbl",
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.3"),
scalaVersion := crossScalaVersions.value.last,
sbtPlugin := false,
publishArtifact in (Compile, packageDoc) := false,
scalacOptions ++= Seq("-deprecation", "-Xcheckinit", "-encoding", "utf8", "-g:vars", "-unchecked", "-optimize"),
parallelExecution := true,
parallelExecution in Test := true,
homepage := Some(new java.net.URL("https://github.com/bitblitconsulting/scala-faker/")),
description := "A library for generating fake data.",
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(
ScmInfo(
url("https://github.com/bitblitconsulting/scala-faker"),
"scm:git@github.com:bitblitconsulting/scala-faker.git"
)
),
developers := List(
Developer(id="j1mr10rd4n", name="Jim Riordan", email="jim@j1mr10rd4n.info", url=url("https://github.com/j1mr10rd4n")),
Developer(id="justwrote", name="Just Wrote", email="unknown", url=url("https://github.com/justwrote"))
),
initialCommands := "import faker._",
libraryDependencies ++= Seq(
"org.yaml" % "snakeyaml" % "1.13",
scalaTest.value
),
// enable publishing the main API jar
publishArtifact in (Compile, packageDoc) := true
)
def scalaTest = Def.setting {
def st(scalaVersion: String, projectVersion: String) =
"org.scalatest" % ("scalatest_" + scalaVersion) % projectVersion % "test"
scalaBinaryVersion.value match {
case "2.10" => st("2.10", "2.1.7")
case "2.11" => st("2.11", "2.1.7")
case "2.12" => st("2.12", "3.0.4")
case _ => sys.error("ScalaTest not supported for scala version %s!" format version)
}
}