-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
104 lines (95 loc) · 2.88 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
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
import xerial.sbt.Sonatype._
val scala213 = "2.13.8"
val scala3 = "3.2.0"
val scalaOptions =
Seq(
"-language:postfixOps",
"-deprecation",
"-encoding",
"UTF-8",
"-feature",
"-unchecked",
"-language:higherKinds",
"-language:implicitConversions",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-extra-implicit",
"-Ywarn-unused:implicits",
"-Ywarn-unused:imports",
"-Ywarn-unused:locals",
"-Ywarn-unused:params",
"-Ywarn-unused:patvars",
"-Ywarn-unused:privates",
"-Xlint"
)
val publishSettings = Seq[Setting[_]](
crossScalaVersions := Seq(scala213),
sonatypeProfileName := "com.github.simerplaha",
publishMavenStyle := true,
licenses := Seq("APL2" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
publish := {},
// publishLocal := {},
sonatypeProjectHosting := Some(GitHubHosting("simerplaha", "JustSQL", "[email protected]")),
developers := List(
Developer(id = "simerplaha", name = "Simer JS Plaha", email = "[email protected]", url = url("https://github.com/simerplaha/JustSQL"))
),
scalacOptions ++= scalaOptions,
publishTo := sonatypePublishTo.value,
releaseCrossBuild := true,
releaseVersionBump := sbtrelease.Version.Bump.Next,
publishConfiguration := publishConfiguration.value.withOverwrite(true),
releaseProcess :=
Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
)
lazy val testDeps =
Seq(
"ch.qos.logback" % "logback-classic" % "1.4.1" % Test,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5" % Test,
"org.scalatest" %% "scalatest" % "3.2.12" % Test,
"org.postgresql" % "postgresql" % "42.5.0" % Test
)
val commonSettings =
Seq[Setting[_]](
ThisBuild / scalaVersion := scala213,
Global / concurrentRestrictions += Tags.limit(Tags.Test, 1)
)
lazy val `JustSQL-root` =
(project in file("."))
.settings(
commonSettings,
publishSettings
).aggregate(justsql, `justsql-hikari`, `justsql-slick`)
lazy val justsql =
project
.settings(
commonSettings,
publishSettings,
libraryDependencies ++= testDeps
)
lazy val `justsql-hikari` =
project
.settings(
commonSettings,
publishSettings,
libraryDependencies ++= testDeps :+ "com.zaxxer" % "HikariCP" % "5.0.1"
).dependsOn(justsql % "test->test;compile->compile")
lazy val `justsql-slick` =
project
.settings(
commonSettings,
publishSettings,
libraryDependencies ++= testDeps :+ "com.typesafe.slick" %% "slick" % "3.4.1"
).dependsOn(justsql % "test->test;compile->compile")