forked from pathikrit/better-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
98 lines (91 loc) · 3.3 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
lazy val commonSettings = Seq(
version := "2.14.0",
organization := "com.github.pathikrit",
scalaVersion := "2.11.7",
crossScalaVersions := Seq("2.10.6", "2.11.7"),
crossVersion := CrossVersion.binary,
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint"),
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yinline-warnings",
"-Yno-adapted-args",
"-Ywarn-dead-code",
//"-Ywarn-numeric-widen", // bugs in 2.10
//"-Ywarn-value-discard",
//"-Ywarn-unused-import", // 2.11 only
//"-Xexperimental", // 2.11 only
"-Xfuture"
),
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.5" % Test
)
lazy val core = (project in file("core"))
.settings(commonSettings: _*)
.settings(publishSettings: _*)
.settings(
name := "better-files",
description := "Simple, safe and intuitive I/O in Scala"
)
lazy val akka = (project in file("akka"))
.settings(commonSettings: _*)
.settings(publishSettings: _*)
.settings(
name := "better-files-akka",
description := "Reactive file watcher using Akka actors",
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.14"
)
.dependsOn(core)
lazy val benchmarks = (project in file("benchmarks"))
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
.settings(
name := "better-files-benchmarks",
libraryDependencies += "com.storm-enroute" %% "scalameter-core" % "0.7" % Test
)
.dependsOn(core)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(docSettings: _*)
.settings(noPublishSettings: _*)
.aggregate(core, akka)
import UnidocKeys._
lazy val docSettings = unidocSettings ++ site.settings ++ ghpages.settings ++ Seq(
autoAPIMappings := true,
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(core, akka),
SiteKeys.siteSourceDirectory := file("site"),
site.addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), "latest/api"),
git.remoteRepo := "git@github.com:pathikrit/better-files.git"
)
lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
lazy val publishSettings = Seq(
homepage := Some(url("https://github.com/pathikrit/better-files")),
licenses += "MIT" -> url("https://github.com/pathikrit/better-files/blob/master/LICENSE"),
scmInfo := Some(ScmInfo(url("https://github.com/pathikrit/better-files"), "git@github.com:pathikrit/better-files.git")),
apiURL := Some(url("https://pathikrit.github.io/better-files/latest/api/")),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
credentials ++= (for {
username <- sys.env.get("SONATYPE_USERNAME")
password <- sys.env.get("SONATYPE_PASSWORD")
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq,
pomExtra :=
<developers>
<developer>
<id>pathikrit</id>
<name>Pathikrit Bhowmick</name>
<url>http://github.com/pathikrit</url>
</developer>
</developers>
)