-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
122 lines (96 loc) · 3.25 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
ThisBuild / version := "0.0.1" // global version to determine central or snapshots.
ThisBuild / organization := "io.chrisdavenport"
ThisBuild / organizationName := "Christopher Davenport"
ThisBuild / licenses := Seq(License.MIT)
ThisBuild / developers := List(
tlGitHubDev("christopherdavenport", "Christopher Davenport")
)
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / tlSonatypeUseLegacyHost := true
val Scala3 = "3.3.3"
ThisBuild / crossScalaVersions := Seq("2.13.12", Scala3)
ThisBuild / scalaVersion := Scala3
ThisBuild / testFrameworks += new TestFramework("munit.Framework")
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / tlSitePublishBranch := Some("main")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / mergifyStewardConfig ~= {
_.map(_.copy(mergeMinors = true, author = "davenverse-steward[bot]"))
}
// val munitCatsEffectV = "1.0.7"
val circuitV = "0.5.1"
val epimetheusV = "0.6.0-M1"
val mulesV = "0.7.0"
val redis4catsV = "1.5.0"
val rediculousV = "0.5.1"
val log4catsV = "2.7.0"
// Projects
lazy val `epimetheus-community` = tlCrossRootProject
.aggregate(circuit, mules, log4cats, rediculous, redis4cats, site)
lazy val log4cats = mkProject("log4cats")
.settings(
name := "epimetheus-log4cats",
version := "0.6.0",
libraryDependencies ++= Seq(
"org.typelevel" %% "log4cats-core" % log4catsV,
)
)
lazy val mules= mkProject("mules")
.settings(
name := "epimetheus-mules",
version := "0.5.0",
libraryDependencies ++= Seq(
"io.chrisdavenport" %% "mules" % mulesV,
)
)
lazy val rediculous = mkProject("rediculous")
.settings(
name := "epimetheus-rediculous",
version := "0.1.0",
libraryDependencies ++= Seq(
"io.chrisdavenport" %% "rediculous" % rediculousV,
)
)
lazy val redis4cats = mkProject("redis4cats")
.settings(
name := "epimetheus-redis4cats",
version := "0.2.0",
libraryDependencies ++= Seq(
"dev.profunktor" %% "redis4cats-effects" % redis4catsV
)
)
lazy val circuit = mkProject("circuit")
.settings(
name := "epimetheus-circuit",
version := "0.5.1",
libraryDependencies ++= Seq(
"io.chrisdavenport" %% "circuit" % circuitV,
)
)
lazy val site = project.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(
tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate)
)
def mkProject(name: String) =
sbt.Project(name, file(name))
.settings(
mimaPreviousArtifacts := Set(),
libraryDependencies += "io.chrisdavenport" %% "epimetheus" % epimetheusV,
publish / skip := {
import coursier._
val mod = CrossVersion(crossVersion.value, scalaVersion.value, scalaBinaryVersion.value)
.get.apply(moduleName.value)
val dep = Dependency(Module(Organization(organization.value), ModuleName(mod)), Keys.version.value)
try { // if this dep already exists, skip publishing
Resolve()
.addDependencies(dep)
.addRepositories(Repositories.sonatype("releases"))
.run()
true
} catch {
case _: error.ResolutionError => false
}
}
)