forked from russwyte/saferis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
105 lines (97 loc) · 3.79 KB
/
build.sbt
File metadata and controls
105 lines (97 loc) · 3.79 KB
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
import xerial.sbt.Sonatype.sonatypeCentralHost
val scala3Version = "3.3.6"
val zioVersion = "2.1.24"
// Global settings using ThisBuild scope
ThisBuild / scalaVersion := scala3Version
ThisBuild / organization := "io.github.russwyte"
ThisBuild / organizationName := "russwyte"
ThisBuild / organizationHomepage := Some(url("https://github.com/russwyte"))
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / homepage := Some(url("https://github.com/russwyte/saferis"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/russwyte/saferis"),
"scm:git@github.com:russwyte/saferis.git",
)
)
ThisBuild / developers := List(
Developer(
id = "russwyte",
name = "Russ White",
email = "356303+russwyte@users.noreply.github.com",
url = url("https://github.com/russwyte"),
)
)
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
usePgpKeyHex("2F64727A87F1BCF42FD307DD8582C4F16659A7D6")
lazy val commonSettings = Seq(
scalacOptions ++= Seq(
"-deprecation",
"-Wunused:all",
"-feature",
),
scalafixDependencies += "com.github.vovapolu" %% "scaluzzi" % "0.1.23",
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
pomIncludeRepository := { _ => false },
sonatypeCredentialHost := sonatypeCentralHost,
publishTo := sonatypePublishToBundle.value,
)
// Root project aggregates all modules but is not published
lazy val root = project
.in(file("."))
.aggregate(core, docs)
.settings(
name := "saferis-root",
publish / skip := true,
)
// Core library - the main publishable artifact
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(publishSettings)
.settings(
name := "saferis",
description := "Saferis mitigates the discord of unsafe SQL. It is a resource safe SQL client library.",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion % "provided",
"dev.zio" %% "zio-streams" % zioVersion % "provided",
"dev.zio" %% "zio-json" % "0.9.0" % "provided",
"dev.zio" %% "zio-logging-slf4j2-bridge" % "2.5.3" % Test,
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test,
"dev.zio" %% "zio-test-magnolia" % zioVersion % Test,
"org.testcontainers" % "postgresql" % "1.21.4" % Test,
"org.postgresql" % "postgresql" % "42.7.9" % Test,
),
dependencyOverrides ++= Seq(
"org.apache.commons" % "commons-compress" % "1.27.1" % Test,
"org.apache.commons" % "commons-lang3" % "3.18.0" % Test,
"com.fasterxml.jackson.core" % "jackson-core" % "2.18.6" % Test,
),
)
// Documentation module - uses mdoc to compile code examples
lazy val docs = project
.in(file("saferis-docs"))
.dependsOn(core)
.enablePlugins(MdocPlugin)
.settings(commonSettings)
.settings(
name := "saferis-docs",
publish / skip := true,
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-json" % "0.9.0",
"org.testcontainers" % "postgresql" % "1.21.4",
"org.postgresql" % "postgresql" % "42.7.9",
),
mdocVariables := Map(
"VERSION" -> version.value
),
mdocIn := file("saferis-docs") / "docs",
mdocOut := file("docs"),
// Suppress unused warnings in mdoc - examples often show imports without using them
scalacOptions ~= (_.filterNot(_ == "-Wunused:all")),
)