forked from ruippeixotog/scala-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
102 lines (83 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
99
100
101
102
import ReleaseTransformations._
organization in ThisBuild := "net.ruippeixotog"
scalaVersion in ThisBuild := "2.13.1"
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.10", "2.13.1")
lazy val core = project.in(file("core"))
.enablePlugins(TutPlugin)
.settings(commonSettings: _*)
.settings(
name := "scala-scraper",
libraryDependencies ++= Seq(
"com.github.nscala-time" %% "nscala-time" % "2.26.0",
"net.sourceforge.htmlunit" % "htmlunit" % "2.45.0",
"org.jsoup" % "jsoup" % "1.13.1",
"org.scalaz" %% "scalaz-core" % "7.2.30",
"com.typesafe.akka" %% "akka-http" % "10.1.13" % "test",
"com.typesafe.akka" %% "akka-stream" % "2.5.32" % "test",
"org.slf4j" % "slf4j-nop" % "1.7.30" % "test",
"org.specs2" %% "specs2-core" % "4.10.5" % "test"),
tutTargetDirectory := file("."))
val baseScalacOptions = Seq(
"-deprecation",
"-unchecked",
"-feature",
"-language:implicitConversions",
"-language:higherKinds"
)
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.4.1",
"org.specs2" %% "specs2-core" % "4.10.5" % "test"))
lazy val commonSettings = Seq(
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
"Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases"),
scalacOptions ++= baseScalacOptions ++ (CrossVersion
.partialVersion(scalaVersion.value) match {
case Some((2, scalaMajor)) if scalaMajor <= 12 =>
Seq("-Ypartial-unification")
case _ => Seq.empty[String]
}),
scalafmtOnCompile := true,
fork in Test := true,
tutTargetDirectory := baseDirectory.value,
fork in Tut := true,
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:[email protected]:ruippeixotog/scala-scraper.git")),
developers := List(
Developer("ruippeixotog", "Rui Gonçalves", "[email protected]", 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)