-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
127 lines (107 loc) · 3.79 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
import sbt.librarymanagement.For3Use2_13
name := "derivation"
publish / skip := true
ThisBuild / scalaVersion := Version.scala
ThisBuild / organization := "com.evolution"
ThisBuild / startYear := Some(2022)
ThisBuild / organizationName := "Evolution"
ThisBuild / organizationHomepage := Some(url("https://evolution.com"))
ThisBuild / versionScheme := Some("early-semver")
testFrameworks += new TestFramework("munit.Framework")
val scala3Settings = scalacOptions ++= Vector(
"-Yexplicit-nulls",
"-encoding",
"utf-8",
"-Yshow-suppressed-errors",
)
val testDependencies = libraryDependencies ++= Vector(
"org.scalameta" %% "munit" % Version.munit % Test,
)
lazy val publishSettings = Vector(
homepage := Some(url("https://github.com/evolution-gaming/derivation")),
developers := List(
Developer(
"Odomontois",
"Oleg Nizhnik",
url("https://github.com/Odomontois"),
),
Developer(
"FunFunFine",
"Anton Voitsishevskii",
url("https://github.com/FunFunFine"),
),
),
publishMavenStyle := true,
Test / publishArtifact := false,
versionScheme := Some("early-semver"),
description := "A derivation library for scala 3 with annotation based configuration.",
scmInfo := Some(
ScmInfo(
url("https://github.com/evolution-gaming/derivation"),
"[email protected]:evolution-gaming/derivation.git",
),
),
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
releaseCrossBuild := true,
publishTo := Some(Resolver.evolutionReleases),
)
val defaultSettings = testDependencies ++ scala3Settings ++ publishSettings
val modules = file("modules")
lazy val derivation = project
.in(modules / "core")
.settings(
name := "derivation-core",
)
.settings(defaultSettings)
lazy val tests = project
.in(modules / "tests")
.settings(
publish / skip := true,
defaultSettings,
libraryDependencies += "io.circe" %% "circe-parser" % Version.circe % Test,
)
.dependsOn(derivation, circe, tapir, cats, playJson)
lazy val circe = project
.in(modules / "circe")
.settings(
name := "derivation-circe",
libraryDependencies += "io.circe" %% "circe-core" % Version.circe,
defaultSettings,
)
.dependsOn(derivation)
// circe codecs which for compatibility uses circe-core_2.13 artifact
lazy val `circe-compat_213` = project
.in(modules / "circe")
.settings(
name := "derivation-circe-compat213",
target := (file("modules") / "circe" / "target-compat213" / "jvm").getAbsoluteFile,
libraryDependencies += "io.circe" %% "circe-core" % Version.circe cross For3Use2_13(),
defaultSettings,
)
.dependsOn(derivation)
lazy val tapir = project
.in(modules / "tapir")
.settings(
name := "derivation-tapir",
libraryDependencies += "com.softwaremill.sttp.tapir" %% "tapir-core" % Version.tapir,
defaultSettings,
)
.dependsOn(derivation)
lazy val cats = project
.in(modules / "cats")
.settings(
name := "derivation-cats",
libraryDependencies += "org.typelevel" %% "cats-kernel" % Version.cats,
defaultSettings,
)
.dependsOn(derivation)
lazy val playJson = project
.in(modules / "playJson")
.settings(
name := "derivation-play-json",
libraryDependencies += "com.typesafe.play" %% "play-json" % Version.playJson cross CrossVersion.for3Use2_13,
defaultSettings,
)
.dependsOn(derivation)