-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
68 lines (59 loc) · 2.13 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
def publishVersion: String = sys.env.getOrElse("RELEASE_VERSION", "local")
def isRelease: Boolean = publishVersion != "local"
lazy val scala212 = "2.12.13"
lazy val scala213 = "2.13.6"
lazy val supportedScalaVersions = List(scala213, scala212)
name := "address-formatter"
organization := "io.github.ben-willis"
version := publishVersion
scalaVersion := scala212
crossScalaVersions := supportedScalaVersions
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/ben-willis/address-formatter"),
"scm:git@github.com:ben-willis/address-formatter.git"
)
)
ThisBuild / developers := List(
Developer(
id = "ben-willis",
name = "Ben Willis",
email = "benwillis0612@gmail.com",
url = url("https://ben-willis.co.uk")
)
)
ThisBuild / description := "Universal international address formatter in Scala."
ThisBuild / licenses := List("MIT" -> new URL("https://github.com/ben-willis/address-formatter/blob/main/LICENSE"))
ThisBuild / homepage := Some(url("https://github.com/ben-willis/address-formatter"))
credentials := Seq(
Credentials(
"Sonatype Nexus Repository Manager",
"s01.oss.sonatype.org",
sys.env.getOrElse("OSSRH_USERNAME", ""),
sys.env.getOrElse("OSSRH_PASSWORD", "")
))
ThisBuild / pomIncludeRepository := Function.const(false)
ThisBuild / publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % "0.12.3",
"io.circe" %% "circe-generic" % "0.12.3",
"io.circe" %% "circe-parser" % "0.12.3",
"io.circe" %% "circe-yaml" % "0.12.0"
)
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.7"
).map(_ % Test)
Compile / unmanagedResourceDirectories += baseDirectory.value / "address-formatting/conf"
Test / unmanagedResourceDirectories += baseDirectory.value / "address-formatting/testcases"
scalacOptions ++= {
if (scalaVersion.value == scala212) {
List("-Ypartial-unification")
} else {
List.empty
}
}