-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbuild.sbt
176 lines (162 loc) · 5.54 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import com.jsuereth.sbtpgp.PgpKeys.{pgpPublicRing, pgpSecretRing}
import microsites.ConfigYml
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
import scala.xml.transform.{RewriteRule, RuleTransformer}
enablePlugins(Common, ZioAwsCodegenPlugin, GitVersioning)
ThisBuild / ciParallelJobs := 5
ThisBuild / ciSeparateJobs := Seq("zio-aws-ec2")
ThisBuild / ciTarget := file(".github/workflows/ci.yml")
ThisBuild / artifactListTarget := file("docs/artifacts.md")
ThisBuild / versionScheme := Some(VersionScheme.PVP)
Global / pgpPublicRing := file("/tmp/public.asc")
Global / pgpSecretRing := file("/tmp/secret.asc")
Global / pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toCharArray())
lazy val root = Project("zio-aws", file(".")).settings(
publishArtifact := false
) aggregate (core, http4s, netty, akkahttp, docs)
lazy val core = Project("zio-aws-core", file("zio-aws-core"))
.settings(
libraryDependencies ++= Seq(
"software.amazon.awssdk" % "aws-core" % awsVersion,
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-interop-reactivestreams" % zioReactiveStreamsInteropVersion,
"dev.zio" %% "zio-prelude" % zioPreludeVersion,
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test",
"dev.zio" %% "zio-config-typesafe" % zioConfigVersion % Test
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Compile / doc / sources := Seq.empty // Broken on Scala 3
)
lazy val http4s = Project("zio-aws-http4s", file("zio-aws-http4s"))
.settings(
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-client" % blazeVersion,
"software.amazon.awssdk" % "http-client-spi" % awsVersion,
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-interop-cats" % zioCatsInteropVersion,
"co.fs2" %% "fs2-reactive-streams" % fs2Version,
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2"
)
)
.dependsOn(core)
lazy val akkahttp = Project("zio-aws-akka-http", file("zio-aws-akka-http"))
.settings(
libraryDependencies ++= Seq(
("com.typesafe.akka" %% "akka-stream" % "2.6.19")
.cross(CrossVersion.for3Use2_13)
.exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
("com.typesafe.akka" %% "akka-http" % "10.2.10")
.cross(CrossVersion.for3Use2_13)
.exclude("org.scala-lang.modules", "scala-collection-compat_2.13"),
("com.github.matsluni" %% "aws-spi-akka-http" % "1.0.1")
.cross(CrossVersion.for3Use2_13)
.exclude("org.scala-lang.modules", "scala-collection-compat_2.13")
)
)
.dependsOn(core)
lazy val netty = Project("zio-aws-netty", file("zio-aws-netty"))
.settings(
libraryDependencies ++= Seq(
"software.amazon.awssdk" % "netty-nio-client" % awsVersion
)
)
.dependsOn(core)
lazy val examples = Project("examples", file("examples")).settings(
publishArtifact := false
) aggregate (
example1,
// example2,
example3
)
lazy val example1 = Project("example1", file("examples") / "example1")
.dependsOn(
core,
http4s,
netty,
LocalProject("zio-aws-elasticbeanstalk"),
LocalProject("zio-aws-ec2")
)
lazy val example2 = Project("example2", file("examples") / "example2")
.settings(
resolvers += Resolver.jcenterRepo,
libraryDependencies ++= Seq(
"nl.vroste" %% "rezilience" % "0.9.2"
)
)
.dependsOn(
core,
netty,
LocalProject("zio-aws-dynamodb")
)
lazy val example3 = Project("example3", file("examples") / "example3")
.dependsOn(
core,
http4s,
netty,
LocalProject("zio-aws-kinesis")
)
lazy val integtests = Project("integtests", file("integtests"))
.settings(
crossScalaVersions := List(scala212Version, scala213Version),
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion,
"dev.zio" %% "zio-test-sbt" % zioVersion,
"org.apache.logging.log4j" % "log4j-1.2-api" % "2.17.1",
"org.apache.logging.log4j" % "log4j-core" % "2.17.1",
"org.apache.logging.log4j" % "log4j-api" % "2.17.1",
"org.apache.logging.log4j" % "log4j-slf4j-impl" % "2.17.1"
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Test / parallelExecution := false,
evictionErrorLevel := Level.Info
)
.dependsOn(
core,
http4s,
netty,
akkahttp,
LocalProject("zio-aws-s3"),
LocalProject("zio-aws-dynamodb")
)
lazy val docs = project
.in(file("zio-aws-docs"))
.settings(
publish / skip := true,
moduleName := "zio-aws-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
projectName := "ZIO AWS",
badgeInfo := Some(
BadgeInfo(
artifact = "zio-aws-core_2.13",
projectStage = ProjectStage.ProductionReady
)
),
docsPublishBranch := "master",
sbtBuildOptions := List(
"-J-XX:+UseG1GC",
"-J-Xmx4g",
"-J-Xms4g",
"-J-Xss16m",
"++2.13.10",
"generateArtifactList"
),
docsVersioning := DocsVersioning.HashVersioning,
libraryDependencies ++= Seq("dev.zio" %% "zio-config" % zioConfigVersion)
)
.dependsOn(
core,
http4s,
netty,
akkahttp,
LocalProject("zio-aws-elasticbeanstalk"),
LocalProject("zio-aws-ec2"),
LocalProject("zio-aws-netty")
)
.enablePlugins(WebsitePlugin)