-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.sbt
223 lines (204 loc) · 6.53 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import Dependencies.Library
lazy val scala213: String = "2.13.15"
lazy val scala3: String = "3.3.4"
lazy val supportedScalaVersions: Seq[String] = Seq(scala213, scala3)
Global / evictionErrorLevel := Level.Info
val sonatypeProfile = "org.playframework"
val previousVersion: Option[String] = None // Some("0.8.0")
val commonSettings = Seq(
sonatypeProfileName := sonatypeProfile,
mimaPreviousArtifacts := previousVersion.map(organization.value %% moduleName.value % _).toSet,
mimaBinaryIssueFilters ++= Seq(
)
)
// Customise sbt-dynver's behaviour to make it work with tags which aren't v-prefixed
ThisBuild / dynverVTagPrefix := false
// Sanity-check: assert that version comes from a tag (e.g. not a too-shallow clone)
// https://github.com/dwijnand/sbt-dynver/#sanity-checking-the-version
Global / onLoad := (Global / onLoad).value.andThen { s =>
dynverAssertTagVersion.value
s
}
ThisBuild / description := "Authentication library for Play Framework applications that supports several authentication methods, including OAuth1, OAuth2, OpenID, CAS, Credentials, Basic Authentication, Two Factor Authentication or custom authentication schemes"
ThisBuild / homepage := Some(url("https://silhouette.readme.io/"))
ThisBuild / licenses := Seq("Apache License" -> url("https://github.com/playframework/play-silhouette/blob/main/LICENSE"))
ThisBuild / Test / publishArtifact := false
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / organization := "org.playframework.silhouette"
ThisBuild / organizationName := "The Play Framework Project"
ThisBuild / scalaVersion := scala213
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / scalacOptions ++= Seq(
"-feature",
"-Xfatal-warnings"
) ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq(
"-encoding", "utf8",
"-unchecked",
"-deprecation",
"-Xlint:adapted-args",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:nullary-unit"
)
case _ => Seq()
})
ThisBuild / Test / scalacOptions ~= { options: Seq[String] =>
// Allow dead code in tests (to support using mockito).
options filterNot (_ == "-Ywarn-dead-code")
}
ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / crossVersion := CrossVersion.full
ThisBuild / Test / parallelExecution := false
ThisBuild / Test / fork := true
ThisBuild / javaOptions += "-Xmx1G"
ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible
ThisBuild / developers ++= List(
Developer(
"ndeverge",
"Nicolas Deverge",
"ndeverge",
url("https://github.com/ndeverge")
),
Developer(
"MathisGuillet1",
"Mathis Guillet",
"MathisGuillet1",
url("https://github.com/MathisGuillet1")
),
)
lazy val root = (project in file("."))
.disablePlugins(MimaPlugin)
.aggregate(
silhouette,
silhouetteCas,
silhouetteTotp,
silhouetteCryptoJca,
silhouetteArgon2,
silhouetteBcrypt,
silhouettePersistence,
silhouetteTestkit
)
.enablePlugins(ScalaUnidocPlugin)
.settings(
name := "play-silhouette-root",
sonatypeProfileName := sonatypeProfile,
Defaults.coreDefaultSettings,
publish / skip := true,
)
lazy val silhouette = (project in file("silhouette"))
.settings(commonSettings)
.settings(
name := "play-silhouette",
libraryDependencies ++=
Library.updates ++ Seq(
Library.Play.cache,
Library.Play.ws,
Library.Play.openid,
Library.jwt,
Library.apacheCommonLang,
Library.Play.specs2 % Test,
Library.Specs2.matcherExtra % Test,
Library.mockito % Test,
Library.scalaGuice % Test,
Library.pekkoTestkit % Test
),
)
.enablePlugins(PlayScala)
.disablePlugins(PlayPekkoHttpServer)
lazy val silhouetteCas = (project in file("silhouette-cas"))
.settings(commonSettings)
.settings(
name := "play-silhouette-cas",
libraryDependencies ++=
Library.updates ++ Seq(
Library.casClient,
Library.casClientSupportSAML,
Library.Play.specs2 % Test,
Library.Specs2.matcherExtra % Test,
Library.mockito % Test,
Library.scalaGuice % Test
)
)
.dependsOn(silhouette % "compile->compile;test->test")
lazy val silhouetteTotp = (project in file("silhouette-totp"))
.settings(commonSettings)
.settings(
name := "play-silhouette-totp",
libraryDependencies ++=
Library.updates ++ Seq(
Library.googleAuth,
Library.Play.specs2 % Test
)
)
.dependsOn(silhouette % "compile->compile;test->test")
lazy val silhouetteCryptoJca = (project in file("silhouette-crypto-jca"))
.settings(commonSettings)
.settings(
name := "play-silhouette-crypto-jca",
libraryDependencies ++=
Library.updates ++ Seq(
Library.commonsCodec,
Library.Specs2.core % Test,
Library.Specs2.matcherExtra % Test
)
)
.dependsOn(silhouette)
lazy val silhouetteArgon2 = (project in file("silhouette-password-argon2"))
.settings(commonSettings)
.settings(
name := "play-silhouette-password-argon2",
libraryDependencies ++=
Library.updates ++ Seq(
Library.argon2,
Library.Specs2.core % Test
)
)
.dependsOn(silhouette)
lazy val silhouetteBcrypt = (project in file("silhouette-password-bcrypt"))
.settings(commonSettings)
.settings(
name := "play-silhouette-password-bcrypt",
libraryDependencies ++=
Library.updates ++ Seq(
Library.jbcrypt,
Library.Specs2.core % Test
)
)
.dependsOn(silhouette)
lazy val silhouettePersistence = (project in file("silhouette-persistence"))
.settings(commonSettings)
.settings(
name := "play-silhouette-persistence",
libraryDependencies ++=
Library.updates ++ Seq(
Library.Specs2.core % Test,
Library.Specs2.matcherExtra % Test,
Library.mockito % Test,
Library.scalaGuice % Test
)
)
.dependsOn(silhouette)
lazy val silhouetteTestkit = (project in file("silhouette-testkit"))
.settings(commonSettings)
.settings(
name := "play-silhouette-testkit",
libraryDependencies ++=
Library.updates ++ Seq(
Library.Play.test,
Library.Play.specs2 % Test,
Library.Specs2.matcherExtra % Test,
Library.mockito % Test,
Library.scalaGuice % Test,
Library.pekkoTestkit % Test
)
++ {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Seq(Library.izumiReflect)
case _ => Seq.empty
}
}
)
.enablePlugins(PlayScala)
.dependsOn(silhouette)