-
Notifications
You must be signed in to change notification settings - Fork 97
/
build.sbt
74 lines (72 loc) · 2.47 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
val commonDependenciesInTestScope = Seq(
"org.scalatest" %% "scalatest" % "3.2.17" % "test",
"ch.qos.logback" % "logback-classic" % "1.4.11" % "test"
)
lazy val scalaOAuth2ProviderSettings =
Defaults.coreDefaultSettings ++
Seq(
organization := "com.nulab-inc",
scalaVersion := "3.3.0",
crossScalaVersions ++= Seq("2.13.12", "2.12.18", "2.11.12"),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature"),
scalacOptions ++= {
scalaBinaryVersion.value match {
case "2.12" | "2.13" =>
Seq("-Xsource:3")
case _ =>
Nil
}
},
publishTo := {
val v = version.value
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
(Compile / doc / scalacOptions) ++= {
val v = if (isSnapshot.value) {
sys.process.Process("git rev-parse HEAD").lineStream_!.head
} else {
version.value
}
Seq(
"-sourcepath",
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url",
s"https://github.com/nulab/scala-oauth2-provider/${v}€{FILE_PATH}.scala"
)
},
publishMavenStyle := true,
(Test / publishArtifact) := false,
pomIncludeRepository := { x =>
false
},
pomExtra := <url>https://github.com/nulab/scala-oauth2-provider</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/nulab/scala-oauth2-provider</url>
<connection>scm:git:[email protected]:nulab/scala-oauth2-provider.git</connection>
</scm>
<developers>
<developer>
<id>tsuyoshizawa</id>
<name>Tsuyoshi Yoshizawa</name>
<url>https://github.com/tsuyoshizawa</url>
</developer>
</developers>
)
lazy val root = (project in file("."))
.settings(
scalaOAuth2ProviderSettings,
name := "scala-oauth2-core",
description := "OAuth 2.0 server-side implementation written in Scala",
version := "1.6.1-SNAPSHOT",
libraryDependencies ++= commonDependenciesInTestScope
)