-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild.sbt
More file actions
executable file
·100 lines (89 loc) · 3.11 KB
/
Copy pathbuild.sbt
File metadata and controls
executable file
·100 lines (89 loc) · 3.11 KB
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
crossScalaVersions := Seq("2.12.18", "2.13.12", "3.3.1")
organization := "org.pac4j"
version := "5.0.1-SNAPSHOT"
val circeVersion = "0.14.7"
val http4sVersion = "0.23.27"
val pac4jVersion = "6.0.3"
val specs2Version = "4.20.3"
val catsVersion = "2.10.0"
val vaultVersion = "3.5.0"
val mouseVersion = "1.2.3"
val catsEffectTestingVersion = "1.5.0"
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-jawn" % circeVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-server" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"org.pac4j" % "pac4j-core" % pac4jVersion,
"org.slf4j" % "slf4j-api" % "2.0.10",
"commons-codec" % "commons-codec" % "1.17.0",
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "vault" % vaultVersion,
"org.typelevel" %% "mouse" % mouseVersion,
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
)
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-jawn" % http4sVersion % Test,
"org.specs2" %% "specs2-matcher-extra" % specs2Version % Test,
"org.specs2" %% "specs2-scalacheck" % specs2Version % Test,
"org.specs2" %% "specs2-cats" % specs2Version % Test,
"org.typelevel" %% "cats-effect-testing-specs2" % catsEffectTestingVersion % Test
)
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq(
"io.circe" %% "circe-optics" % "0.14.1" % Test,
)
case _ => Seq(
"io.circe" %% "circe-optics" % "0.15.0" % Test,
)
}
}
val username = sys.env.get("SONATYPE_USERNAME").getOrElse("")
val password = sys.env.get("SONATYPE_PASSWORD").getOrElse("")
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
homepage := Some(url("https://github.com/pac4j/http4s-pac4j"))
licenses := List("Apache 2" -> new URL("https://www.apache.org/licenses/LICENSE-2.0.txt"))
scmInfo := Some(
ScmInfo(
url("https://github.com/pac4j/http4s-pac4j"),
"scm:git@github.com:pac4j/http4s-pac4j.git"
)
)
developers := List(
Developer(
id = "leleuj",
name = "Jerome LELEU",
email = "leleuj@gmail.com",
url = url("https://github.com/leleuj")
)
)
pomIncludeRepository := { _ => false }
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
val globalScalacOptions = Seq(
"-deprecation",
"-language:implicitConversions",
"-language:higherKinds"
)
val extraScalacOptions_2 = Seq(
"-Xlint"
)
val extraScalacOptions_2_12 = Seq(
"-Ypartial-unification"
)
val extraScalacOptions_3 = Seq(
"-Wunused:all"
)
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => globalScalacOptions ++ extraScalacOptions_2 ++ extraScalacOptions_2_12
case Some((2, 13)) => globalScalacOptions ++ extraScalacOptions_2
case _ => globalScalacOptions ++ extraScalacOptions_3
}
}