-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sbt
141 lines (124 loc) · 5.69 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
import Dependencies._
import Libraries._
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / homepage := Some(url("https://github.com/carlos-verdes/zio-arangodb"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/carlos-verdes/zio-arangodb"), "[email protected]:carlos-verdes/zio-arangodb.git"))
ThisBuild / developers := List(Developer("carlos-verdes", "Carlos Verdes", "[email protected]", url("https://github.com/carlos-verdes")))
ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("releases")
// release plugin
//import ReleaseTransformations._
//import xerial.sbt.Sonatype._
ThisBuild / releaseCrossBuild := true
ThisBuild / releasePublishArtifactsAction := PgpKeys.publishSigned.value
Test / fork := true
IntegrationTest / fork := true
inThisBuild(
Seq(
organization := "io.funkode",
scalaVersion :="3.3.1",
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0",
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost :="s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
startYear := Some(2022),
licenses += ("MIT", new URL("https://opensource.org/licenses/MIT")),
))
ThisBuild / scalacOptions ++=
Seq(
"-deprecation",
//"-explain",
"-feature",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
// "-Yexplicit-nulls", // experimental (I've seen it cause issues with circe)
"-Ykind-projector",
// "-Ysafe-init", // experimental (I've seen it cause issues with circe)
"-Yretain-trees"
) ++ Seq("-rewrite", "-indent") ++ Seq("-source", "future-migration")
lazy val commonLibs = Seq(scalaUri, logBack, zioPrelude, jansi, zioConfMagnolia, zioConfTypesafe)
lazy val zioSchemaLibs = Seq(zioSchemaJson, zioSchemaDeriv)
lazy val zioLibs = Seq(zio, zioHttp, zioJson, zioConcurrent, zioConfMagnolia, zioConfTypesafe) ++ zioSchemaLibs
lazy val testLibs = Seq(zioTest, zioTestSbt, zioJGolden, zioHttpTestKit).map(_ % "it, test")
lazy val velocypack =
project
.in(file("velocypack"))
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(headerSettings(Test, IntegrationTest))
.settings(Seq(
name := "zio-velocypack",
libraryDependencies ++= commonLibs ++ Seq(scodecCore) ++ zioLibs ++ testLibs,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
headerLicense := Some(HeaderLicense.MIT("2022", "Carlos Verdes", HeaderLicenseStyle.SpdxSyntax)),
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax)
.enablePlugins(AutomateHeaderPlugin)
lazy val arango =
project
.in(file("arangodb"))
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(headerSettings(Test, IntegrationTest))
.settings(Seq(
name := "zio-arangodb",
libraryDependencies ++= commonLibs ++ zioLibs ++ testLibs,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
headerLicense := Some(HeaderLicense.MIT("2022", "Carlos Verdes", HeaderLicenseStyle.SpdxSyntax)),
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax))
.dependsOn(velocypack)
.enablePlugins(AutomateHeaderPlugin)
lazy val docker =
project
.in(file("arangodb-docker"))
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(headerSettings(Test, IntegrationTest))
.settings(Seq(
name := "arangodb-docker",
libraryDependencies ++= Seq(testContainers, logBack) ++ zioLibs ++ testLibs,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
headerLicense := Some(HeaderLicense.MIT("2022", "Carlos Verdes", HeaderLicenseStyle.SpdxSyntax)),
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax))
.dependsOn(arango)
.enablePlugins(AutomateHeaderPlugin)
lazy val http =
project
.in(file("arangodb-http"))
.configs(IntegrationTest)
.settings(Defaults.itSettings)
.settings(headerSettings(Test, IntegrationTest))
.settings(Seq(
name := "zio-arangodb-http",
libraryDependencies ++= commonLibs ++ zioLibs ++ testLibs,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
coverageExcludedPackages := """io.funkode.arangodb.http.Main; io.funkode.*.autoDerive; zio.json.*;""",
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
headerLicense := Some(HeaderLicense.MIT("2022", "Carlos Verdes", HeaderLicenseStyle.SpdxSyntax)),
headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax))
.dependsOn(arango, docker)
.enablePlugins(AutomateHeaderPlugin)
lazy val root =
project
.in(file("."))
.aggregate(arango, http, docker, velocypack)
.settings(
publishArtifact := false,
publish / skip := true)
ThisBuild / coverageExcludedFiles := ".*Main.*;zio\\.json\\.*"
addCommandAlias("ll", "projects")
addCommandAlias("checkFmtAll", ";scalafmtSbtCheck;scalafmtCheckAll")
addCommandAlias("testAll", ";compile;test;stryker")
//addCommandAlias("sanity", ";compile;scalafmtAll;test;stryker")
addCommandAlias("sanity", ";clean;coverage;compile;headerCreate;scalafixAll;scalafmtAll;test;it:test;coverageAggregate;coverageOff")
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}