-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.sbt
111 lines (103 loc) · 4.04 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
import BuildHelper._
Global / onChangedBuildSource := ReloadOnSourceChanges
inThisBuild(
List(
homepage := Some(url("https://github.com/lambdaworks/zio-elasticsearch/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
organization := "io.lambdaworks",
organizationName := "LambdaWorks",
startYear := Some(2022),
developers := List(
Developer(
"lambdaworks",
"LambdaWorks' Team",
url("https://github.com/lambdaworks")
)
),
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
)
)
addCommandAlias("check", "fixCheck; fmtCheck; headerCheck")
addCommandAlias("fix", "scalafixAll")
addCommandAlias("fixCheck", "scalafixAll --check")
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll")
addCommandAlias("fmtCheck", "all scalafmtSbtCheck scalafmtCheckAll")
addCommandAlias("prepare", "fix; fmt; headerCreate")
lazy val root =
project
.in(file("."))
.settings(publish / skip := true)
.aggregate(library, integration, example, docs)
lazy val library =
project
.in(file("modules/library"))
.disablePlugins(RevolverPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(stdSettings("zio-elasticsearch"))
.settings(buildInfoSettings("zio.elasticsearch"))
.settings(scalacOptions += "-language:higherKinds")
.settings(
libraryDependencies ++= List(
"com.softwaremill.sttp.client4" %% "zio" % "4.0.0-M19",
"com.softwaremill.sttp.client4" %% "zio-json" % "4.0.0-M19",
"dev.zio" %% "zio-json" % "0.7.3",
"dev.zio" %% "zio-prelude" % "1.0.0-RC35",
"dev.zio" %% "zio-schema" % "1.5.0",
"dev.zio" %% "zio-schema-json" % "1.5.0",
"org.apache.commons" % "commons-lang3" % "3.17.0",
"dev.zio" %% "zio-test" % "2.1.13" % Test,
"dev.zio" %% "zio-test-sbt" % "2.1.13" % Test
),
testFrameworks := List(new TestFramework("zio.test.sbt.ZTestFramework"))
)
lazy val integration =
project
.in(file("modules/integration"))
.disablePlugins(RevolverPlugin)
.settings(stdSettings("integration"))
.dependsOn(library % "test->test")
.settings(
publish / skip := true
)
lazy val example =
project
.in(file("modules/example"))
.settings(stdSettings("example"))
.settings(scalacOptions += "-language:higherKinds")
.settings(
crossScalaVersions := List(Scala213),
publish / skip := true,
libraryDependencies ++= List(
"dev.zio" %% "zio" % "2.1.13",
"dev.zio" %% "zio-config" % "4.0.2",
"dev.zio" %% "zio-config-magnolia" % "4.0.2",
"dev.zio" %% "zio-config-typesafe" % "4.0.2",
"dev.zio" %% "zio-http" % "3.0.1",
"dev.zio" %% "zio-json" % "0.7.3",
"dev.zio" %% "zio-schema" % "1.5.0",
"dev.zio" %% "zio-schema-json" % "1.5.0"
)
)
.dependsOn(library)
.settings(
publish / skip := true
)
lazy val docs =
project
.in(file("modules/docs"))
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
.disablePlugins(RevolverPlugin)
.dependsOn(library)
.settings(
publish / skip := true,
moduleName := "docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(library),
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
)