forked from ruippeixotog/scala-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
98 lines (80 loc) · 3.49 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
import ReleaseTransformations._
import scalariform.formatter.preferences._
organization in ThisBuild := "net.ruippeixotog"
scalaVersion in ThisBuild := "2.12.8"
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.8")
lazy val core = project.in(file("core"))
.enablePlugins(TutPlugin)
.settings(commonSettings: _*)
.settings(
name := "scala-scraper",
libraryDependencies ++= Seq(
"com.github.nscala-time" %% "nscala-time" % "2.22.0",
"net.sourceforge.htmlunit" % "htmlunit" % "2.34.1",
"org.jsoup" % "jsoup" % "1.11.3",
"org.scalaz" %% "scalaz-core" % "7.2.27",
"org.http4s" %% "http4s-blaze-server" % "0.17.6" % "test",
"org.http4s" %% "http4s-dsl" % "0.17.6" % "test",
"org.slf4j" % "slf4j-nop" % "1.7.26" % "test",
"org.specs2" %% "specs2-core" % "4.5.1" % "test"),
tutTargetDirectory := file("."))
lazy val config = project.in(file("modules/config"))
.dependsOn(core)
.enablePlugins(TutPlugin)
.settings(commonSettings: _*)
.settings(
name := "scala-scraper-config",
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.3.3",
"org.specs2" %% "specs2-core" % "4.5.1" % "test"))
lazy val commonSettings = Seq(
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
"Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases"),
scalariformPreferences := scalariformPreferences.value
.setPreference(DanglingCloseParenthesis, Prevent)
.setPreference(DoubleIndentConstructorArguments, true)
.setPreference(PlaceScaladocAsterisksBeneathSecondAsterisk, true),
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-language:implicitConversions",
"-language:higherKinds",
"-Ypartial-unification"),
fork in Test := true,
tutTargetDirectory := baseDirectory.value,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php")),
homepage := Some(url("https://github.com/ruippeixotog/scala-scraper")),
scmInfo := Some(ScmInfo(
url("https://github.com/ruippeixotog/scala-scraper"),
"scm:git:https://github.com/ruippeixotog/scala-scraper.git",
"scm:git:git@github.com:ruippeixotog/scala-scraper.git")),
developers := List(
Developer("ruippeixotog", "Rui Gonçalves", "ruippeixotog@gmail.com", url("http://www.ruippeixotog.net"))))
// do not publish the root project
skip in publish := true
releaseCrossBuild := true
releaseTagComment := s"Release ${(version in ThisBuild).value}"
releaseCommitMessage := s"Set version to ${(version in ThisBuild).value}"
// necessary due to https://github.com/sbt/sbt-release/issues/184
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
pushChanges)