-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
147 lines (127 loc) · 4.26 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
ThisBuild / organization := "io.h8.borscht"
ThisBuild / organizationName := "H8IO"
ThisBuild / organizationHomepage := Some(url("https://github.com/h8io/"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/h8io/borscht"),
"scm:[email protected]:h8io/borscht.git"
)
)
ThisBuild / developers := List(
Developer(
id = "eshu",
name = "Pavel Parkhomenko",
email = "[email protected]",
url = url("https://github.com/h8io/")
)
)
ThisBuild / description := "Borscht: Scala 3 configuration library"
ThisBuild / licenses := List("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / homepage := Some(url("https://github.com/h8io/borscht"))
ThisBuild / versionScheme := Some("semver-spec")
// Remove all additional repository other than Maven Central from POM
pomIncludeRepository := { _ => false }
sonatypeProfileName := "io.h8"
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
ThisBuild / publishTo := sonatypePublishToBundle.value
import ReleaseTransformations.*
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
ThisBuild / scalaVersion := "3.2.1"
ThisBuild / libraryDependencies ++= Seq(
// Dependencies.ScalaMock % Test,
Dependencies.ScalaTest % Test
)
ThisBuild / scalacOptions ++= Seq(
// "-Yexplicit-nulls",
"-Ysafe-init",
"-explain",
"-new-syntax",
"-unchecked"
)
ThisBuild / javacOptions += "-parameters"
lazy val core = project
.in(file("core"))
.settings(name := "borscht-core")
lazy val `test-core`: Project = project
.in(file("test"))
.settings(publishArtifact := false)
.dependsOn(core)
.aggregate(core)
lazy val `recipe-typesafe` = project
.in(file("recipe/typesafe"))
.settings(name := "borscht-typesafe", libraryDependencies += Dependencies.TypesafeConfig)
.dependsOn(core)
lazy val `recipe-jackson` = project
.in(file("recipe/jackson"))
.settings(name := "borscht-jackson", libraryDependencies += Dependencies.JacksonDatabind)
.dependsOn(core)
lazy val `recipe-jackson-yaml` = project
.in(file("recipe/jackson/yaml"))
.settings(name := "borscht-jackson-yaml", libraryDependencies += Dependencies.JacksonDataformatYAML)
.dependsOn(`recipe-jackson`)
lazy val `recipe-jackson-toml` = project
.in(file("recipe/jackson/toml"))
.settings(name := "borscht-jackson-toml", libraryDependencies += Dependencies.JacksonDataformatTOML)
.dependsOn(`recipe-jackson`)
lazy val `template-core` = project
.in(file("template/core"))
.settings(name := "borscht-template-core")
.dependsOn(core, `test-core` % "test -> compile")
lazy val `template-st4` = project
.in(file("template/st4"))
.settings(name := "borscht-template-st4", libraryDependencies += Dependencies.ST4)
.dependsOn(`template-core`, `test-core` % "test -> compile")
lazy val `template-apache-commons-text` = project
.in(file("template/apache-commons-text"))
.settings(name := "borscht-template-apache-commons-text", libraryDependencies += Dependencies.ApacheCommonsText)
.dependsOn(`template-core`, `test-core` % "test -> compile")
lazy val examples = project
.in(file("examples"))
.settings(
name := "borscht-examples",
libraryDependencies ++= Seq( // for GitHub Scala CI
Dependencies.JacksonDataformatYAML,
Dependencies.ST4,
Dependencies.ApacheCommonsText
),
publishArtifact := false
)
.dependsOn(`recipe-typesafe`, `recipe-jackson-yaml`, `template-st4`, `template-apache-commons-text`)
lazy val classic = project
.in(file("classic"))
.settings(name := "borscht-classic")
.dependsOn(
`recipe-typesafe`,
`template-st4`
)
lazy val root = project
.in(file("."))
.settings(name := "borscht", publishArtifact := false)
.aggregate(
core,
`test-core`,
`recipe-typesafe`,
`recipe-jackson`,
`recipe-jackson-yaml`,
`recipe-jackson-toml`,
`template-core`,
`template-st4`,
`template-apache-commons-text`,
examples,
classic
)