-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.sbt
116 lines (102 loc) · 3.01 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
name := "xs4s-root"
ThisBuild / scalaVersion := "2.13.6"
ThisBuild / crossScalaVersions := Seq("2.12.12", "2.13.6", "3.0.1")
ThisBuild / organization := "com.scalawilliam"
ThisBuild / version := "0.9.1"
ThisBuild / resolvers += Resolver.JCenterRepository
lazy val root = (project in file("."))
.aggregate(core)
.aggregate(example)
.aggregate(fs2)
.aggregate(fs2v3)
.aggregate(zio)
.settings(publishArtifact := false)
lazy val core = project.settings(
libraryDependencies ++= Seq(
"xmlunit" % "xmlunit" % "1.6" % "test",
"org.codehaus.woodstox" % "woodstox-core-asl" % "4.4.1",
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
"org.scala-lang.modules" %% "scala-xml" % "2.0.1"
),
name := "xs4s-core"
)
ThisBuild / pomIncludeRepository := { _ =>
false
}
ThisBuild / publishMavenStyle := true
ThisBuild / 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")
}
def download(source: sbt.URL, target: sbt.File): Int = {
import scala.sys.process._
(source #> target).!
}
lazy val fs2 = project
.dependsOn(core)
.settings(
name := "xs4s-fs2",
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-io" % "2.5.9"
)
)
lazy val fs2v3 = project
.dependsOn(core)
.settings(
name := "xs4s-fs2v3",
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-io" % "3.0.6",
"org.scalatest" %% "scalatest" % "3.2.9" % "test"
)
)
lazy val zio = project
.dependsOn(core)
.settings(
name := "xs4s-zio",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "1.0.9",
"dev.zio" %% "zio-streams" % "1.0.9"
)
)
lazy val example = project
.dependsOn(fs2)
.dependsOn(zio)
.dependsOn(core)
.settings(
publishArtifact := false
)
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / organizationHomepage := Some(url("https://www.scalawilliam.com"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/ScalaWilliam/xs4s"),
"scm:git:[email protected]:ScalaWilliam/xs4s.git"
)
)
ThisBuild / developers := List(
Developer(
id = "ScalaWilliam",
name = "ScalaWilliam",
email = "[email protected]",
url = url("https://www.scalawilliam.com/")
)
)
ThisBuild / description := "XML Streaming library for Scala"
ThisBuild / licenses := List(
"Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"),
"BSD-style" -> new URL("http://www.opensource.org/licenses/bsd-license.php")
)
ThisBuild / homepage := Some(url("https://github.com/ScalaWilliam/xs4s"))
ThisBuild / pomIncludeRepository := { _ =>
false
}
ThisBuild / 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")
}
ThisBuild / publishMavenStyle := true