Repository navigation
Expand file tree
/
Copy pathbuild.sbt
More file actions
94 lines (88 loc) · 2.54 KB
/
Copy pathbuild.sbt
File metadata and controls
94 lines (88 loc) · 2.54 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
import Dependencies.*
def crossSettings[T](scalaVersion: String, if3: T, if2: T) = {
scalaVersion match {
case version if version.startsWith("3") => if3
case _ => if2
}
}
lazy val commonSettings = Seq(
organization := "com.evolution",
homepage := Some(url("https://github.com/evolution-gaming/scache")),
startYear := Some(2019),
organizationName := "Evolution",
organizationHomepage := Some(url("https://evolution.com")),
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := Seq("2.13.18", "3.3.5"),
scalacOptsFailOnWarn := crossSettings(
scalaVersion.value,
if3 = Some(false),
if2 = Some(true)
),
scalacOptions ++= crossSettings(
scalaVersion.value,
if3 = Seq(
"-Ykind-projector:underscores",
"-language:implicitConversions",
"-source:future"
),
if2 = Seq("-Xsource:3", "-P:kind-projector:underscore-placeholders")
),
libraryDependencies ++= crossSettings(
scalaVersion.value,
if3 = Nil,
if2 = Seq(
compilerPlugin(betterMonadicFor),
compilerPlugin(`kind-projector` cross CrossVersion.full)
)
),
autoAPIMappings := true,
licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT"))),
Test / publishArtifact := false,
scmInfo := Some(
ScmInfo(
url("https://github.com/evolution-gaming/scache"),
"git@github.com:evolution-gaming/scache.git"
)
),
developers := List(
Developer(
"t3hnar",
"Yaroslav Klymko",
"yklymko@evolution.com",
url("https://github.com/t3hnar")
)
),
publishTo := Some(Resolver.evolutionReleases)
)
lazy val root = (project in file("."))
.settings(
name := "scache-root",
publish / skip := true,
publishArtifact := false
)
.aggregate(`cache-adt`, scache)
lazy val `cache-adt` = (project in file("cache-adt"))
.settings(commonSettings)
.settings(
name := "cache-adt",
description := "Directive ADT for scache",
versionPolicyIntention := Compatibility.BinaryCompatible
)
lazy val scache = (project in file("scache"))
.settings(commonSettings)
.settings(
name := "scache",
description := "Cache in Scala with cats-effect",
coverageExcludedFiles := ".*CacheOpsCompat.*",
versionPolicyIntention := Compatibility.None,
libraryDependencies ++= Seq(
Cats.core,
Cats.effect,
`cats-helper`,
smetrics,
scalatest % Test
)
)
.dependsOn(`cache-adt`)
addCommandAlias("check", "all versionPolicyCheck Compile/doc")
addCommandAlias("build", "all test package")