forked from zio-archive/zio-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
122 lines (114 loc) · 3.49 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
import BuildHelper._
import Dependencies._
import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.dev")),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"jdegoes",
"John De Goes",
url("http://degoes.net")
)
)
)
)
addCommandAlias("fmt", "all scalafmtSbt scalafmt Test/scalafmt")
addCommandAlias("fix", "; all Compile/scalafix Test/scalafix; all scalafmtSbt scalafmtAll")
addCommandAlias("check", "; scalafmtSbtCheck; scalafmtCheckAll; Compile/scalafix --check; Test/scalafix --check")
lazy val root = project
.in(file("."))
.settings(
publish / skip := true,
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)
.aggregate(
docs,
fileConnector,
s3Connector
)
.enablePlugins(BuildInfoPlugin)
lazy val fileConnector = project
.in(file("connectors/file-connector"))
.settings(stdSettings("zio-connect-file"))
.settings(
libraryDependencies ++= Seq(
zio,
`zio-streams`,
`zio-test`,
`zio-test-sbt`
)
)
.settings(
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 => Seq(`scala-compact-collection`)
case _ => Seq.empty
}
}
)
.settings(testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"))
lazy val s3Connector = project
.in(file("connectors/s3-connector"))
.settings(stdSettings("zio-connect-s3"))
.settings(
libraryDependencies ++= Seq(
S3Dependencies.`aws-java-sdk-core`,
S3Dependencies.localstack,
S3Dependencies.`zio-aws-netty`,
S3Dependencies.`zio-aws-s3`,
zio,
`zio-streams`,
`zio-test`,
`zio-test-sbt`
)
)
.settings(
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 => Seq(`scala-compact-collection`)
case _ => Seq.empty
}
}
)
.settings(
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Test / fork := true
)
lazy val docs = project
.in(file("zio-connect-docs"))
.settings(
publish / skip := true,
moduleName := "zio-connect-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
zio
),
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(fileConnector, s3Connector),
ScalaUnidoc / unidoc / target := (LocalRootProject / baseDirectory).value / "website" / "static" / "api",
cleanFiles += (ScalaUnidoc / unidoc / target).value,
docusaurusCreateSite := docusaurusCreateSite.dependsOn(Compile / unidoc).value,
docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(Compile / unidoc).value
)
.dependsOn(fileConnector, s3Connector)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
lazy val examples = project
.in(file("examples"))
.settings(
publishArtifact := false,
moduleName := "zio-connect-examples"
)
.aggregate(fileConnectorExamples)
lazy val fileConnectorExamples = project
.in(file("examples/file-connector-examples"))
.settings(
publish / skip := true,
scalacOptions -= "-Xfatal-warnings"
)
.dependsOn(LocalProject("fileConnector"))