This repository has been archived by the owner on Mar 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
build.sbt
executable file
·106 lines (94 loc) · 3.44 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
103
104
105
106
import com.typesafe.sbt.SbtGit.{GitKeys => git}
enablePlugins(GhpagesPlugin, SiteScaladocPlugin)
name := "twitter4s"
version := "8.1-SNAPSHOT"
scalaVersion := "2.13.6"
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.jcenterRepo
)
libraryDependencies ++= {
val Typesafe = "1.4.2"
val Akka = "2.6.19"
val AkkaHttp = "10.2.9"
val AkkaHttpJson4s = "1.39.2"
val Json4s = "4.0.5"
val Specs2 = "4.15.0"
val ScalaLogging = "3.9.4"
val RandomDataGenerator = "2.8"
Seq(
"com.typesafe" % "config" % Typesafe,
"com.typesafe.akka" %% "akka-actor" % Akka,
"com.typesafe.akka" %% "akka-stream" % Akka,
"com.typesafe.akka" %% "akka-http" % AkkaHttp,
"de.heikoseeberger" %% "akka-http-json4s" % AkkaHttpJson4s,
"org.json4s" %% "json4s-native" % Json4s,
"org.json4s" %% "json4s-ext" % Json4s,
"com.typesafe.scala-logging" %% "scala-logging" % ScalaLogging,
"org.specs2" %% "specs2-core" % Specs2 % "test",
"org.specs2" %% "specs2-mock" % Specs2 % "test",
"com.typesafe.akka" %% "akka-testkit" % Akka % "test",
"com.danielasfregola" %% "random-data-generator" % RandomDataGenerator % "test"
)
}
ThisBuild / scalacOptions ++= Seq("-language:postfixOps",
"-language:implicitConversions",
"-language:existentials",
"-Xfatal-warnings",
"-feature",
"-deprecation:false")
lazy val standardSettings = Seq(
organization := "com.danielasfregola",
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("https://github.com/DanielaSfregola/twitter4s")),
scmInfo := Some(
ScmInfo(url("https://github.com/DanielaSfregola/twitter4s"),
"scm:git:[email protected]:DanielaSfregola/twitter4s.git")),
apiURL := Some(url("http://DanielaSfregola.github.io/twitter4s/latest/api/")),
crossScalaVersions := Seq(scalaVersion.value, "2.12.15"),
pomExtra :=
<developers>
<developer>
<id>DanielaSfregola</id>
<name>Daniela Sfregola</name>
<url>http://danielasfregola.com/</url>
</developer>
</developers>,
publishMavenStyle := true,
publishTo := {
if (version.value.trim.endsWith("SNAPSHOT")) Some(Opts.resolver.sonatypeSnapshots)
else Some(Opts.resolver.sonatypeStaging)
},
git.gitRemoteRepo := "[email protected]:DanielaSfregola/twitter4s.git",
scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-Xlint",
"-deprecation:false",
"-Xfatal-warnings",
"-feature",
"-language:postfixOps",
"-unchecked"
),
Compile / doc / scalacOptions ++= Seq("-sourcepath", baseDirectory.value.getAbsolutePath),
autoAPIMappings := true,
Compile / doc / scalacOptions ++= {
val branch = if (version.value.trim.endsWith("SNAPSHOT")) "master" else version.value
Seq(
"-doc-source-url",
"https://github.com/DanielaSfregola/twitter4s/tree/" + branch + "€{FILE_PATH}.scala"
)
}
)
lazy val coverageSettings = Seq(
coverageExcludedPackages := "com.danielasfregola.twitter4s.processors.*;com.danielasfregola.twitter4s.Twitter*Client",
coverageMinimum := 85
)
ThisBuild / scalafmtOnCompile := true
ThisBuild / scalafmtTestOnCompile := true
SiteScaladoc / siteSubdirName := version + "/api"
lazy val root = (project in file("."))
.settings(standardSettings ++ coverageSettings)
.settings(
name := "twitter4s"
)