forked from evolution-gaming/derivation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
110 lines (94 loc) · 3.29 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
name := "derivation"
publish / skip := true
ThisBuild / scalaVersion := Version.scala
ThisBuild / organization := "com.evolution"
testFrameworks += new TestFramework("munit.Framework")
val scala3Settings = scalacOptions ++= Vector(
"-Yexplicit-nulls",
"-encoding",
"utf-8",
)
val testDependencies = libraryDependencies ++= Vector(
"org.scalameta" %% "munit" % Version.munit % Test,
)
lazy val publishUserName = sys.env.getOrElse("ARTIFACTORY_PUBLISH_USERNAME", "")
lazy val publishPass = sys.env.getOrElse("ARTIFACTORY_PUBLISH_PASS", "")
lazy val releasesRepo = MavenRepository(
s"artifactory-evolution-maven-local-releases",
s"https://evolution.jfrog.io/artifactory/maven-local-releases",
)
lazy val snapshotsRepo = MavenRepository(
s"artifactory-evolution-maven-local-snapshots",
s"https://evolution.jfrog.io/artifactory/maven-local-snapshots",
)
lazy val publishSettings = Vector(
homepage := Some(url("https://github.com/evolution-gaming/derivation")),
developers := List(
Developer(
"Odomontois",
"Oleg Nizhnik",
"onizhnikov@evolution.com",
url("https://github.com/Odomontois"),
),
Developer(
"FunFunFine",
"Anton Voitsishevskii",
"avoitsishevskii@evolution.com",
url("https://github.com/FunFunFine"),
),
),
publishMavenStyle := true,
Test / publishArtifact := false,
publishTo := Some {
if (isSnapshot.value) snapshotsRepo else releasesRepo
},
credentials += {
if (publishUserName.nonEmpty)
Credentials(
realm = "Artifactory Realm",
host = "evolution.jfrog.io",
userName = publishUserName,
passwd = publishPass,
)
else
Credentials(Path.userHome / ".sbt" / "evo.credentials")
},
versionScheme := Some("early-semver"),
git.baseVersion := "0.1",
git.formattedShaVersion :=
git.gitHeadCommit.value map { sha => s"${git.baseVersion.value}-$sha-SNAPSHOT" },
)
enablePlugins(GitVersioning)
val defaultSettings = testDependencies ++ scala3Settings ++ publishSettings
val modules = file("modules")
lazy val derivation = project
.in(modules / "derivation")
.settings(
name := "derivation-core",
)
.settings(defaultSettings)
lazy val circeDerivation = project
.in(modules / "circeDerivation")
.settings(
name := "derivation-circe",
libraryDependencies += "io.circe" %% "circe-core" % Version.circe,
libraryDependencies += "io.circe" %% "circe-parser" % Version.circe % Test,
defaultSettings,
)
.dependsOn(derivation)
lazy val tapirDerivation = project
.in(modules / "tapirDerivation")
.settings(
name := "derivation-tapir",
libraryDependencies += "com.softwaremill.sttp.tapir" %% "tapir-core" % Version.tapir,
defaultSettings,
)
.dependsOn(derivation)
lazy val playJsonDerivation = project
.in(modules / "playJsonDerivation")
.settings(
name := "derivation-play-json",
libraryDependencies += "com.typesafe.play" %% "play-json" % Version.playJson cross CrossVersion.for3Use2_13,
defaultSettings,
)
.dependsOn(derivation)