-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
87 lines (81 loc) · 2.86 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
import scala.xml.NodeSeq
def jodaDependency = "joda-time" % "joda-time" % "2.12.6"
val commonSettings = Seq(
version := "7.1",
organization := "jp.t2v",
scalaVersion := "3.3.1",
crossScalaVersions := Seq("2.11.12", "2.12.18", "2.13.12", "3.3.1"),
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Seq("-unchecked", "-deprecation", "-feature", "-language:implicitConversions"/*, "-Yexplicit-nulls"*/)
case _ => Seq("-unchecked", "-deprecation", "-feature", "-language:implicitConversions", "-Xdisable-assertions")
}
},
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.17" % "test"
),
publishMavenStyle := true,
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")
},
Test / fork := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<url>https://github.com/t2v/holidays</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:t2v/holidays.git</url>
<connection>scm:git:[email protected]:t2v/holidays.git</connection>
</scm>
<developers>
<developer>
<id>gakuzzzz</id>
<name>gakuzzzz</name>
<url>https://github.com/gakuzzzz</url>
</developer>
</developers>
)
lazy val root = (project in file(".")).aggregate(core, joda).settings(
scalaVersion := "3.3.1",
crossScalaVersions := Seq("2.11.12", "2.12.18", "2.13.12", "3.3.1"),
publishMavenStyle := true,
publish := { },
publishArtifact := false,
packagedArtifacts := Map.empty,
publishTo := Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"),
pomExtra := NodeSeq.Empty
)
lazy val core = (project in file("core")).settings(commonSettings).settings(
name := "holidays",
Test / fullClasspath ~= { oldPath =>
val newPath = oldPath.filterNot(_.data.toString.contains("joda-time"))
assert((oldPath.size - newPath.size) == 1, (newPath, oldPath))
newPath
},
libraryDependencies ++= Seq(
jodaDependency % Provided
)
)
lazy val joda = (project in file("joda")).settings(commonSettings).settings(
name := "holidays-joda",
libraryDependencies ++= Seq(
jodaDependency % Test
),
publishMavenStyle := true,
publish := { },
publishArtifact := false,
packagedArtifacts := Map.empty,
publishTo := Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"),
pomExtra := NodeSeq.Empty
).dependsOn(core)