-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
130 lines (119 loc) · 4.32 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
ThisBuild / name := "zwords"
ThisBuild / organization := "fr.janalyse"
ThisBuild / description := "Guess a word everyday game"
ThisBuild / licenses += "Apache 2" -> url(s"https://www.apache.org/licenses/LICENSE-2.0.txt")
ThisBuild / scalaVersion := "3.5.1"
publishArtifact := false // no artifact for "root" project
val versions = new {
val zio = "2.1.11"
val zionio = "2.0.2"
val zioconfig = "4.0.2"
val ziocli = "0.2.2"
val ziojson = "0.7.3"
val ziologging = "2.3.1"
val ziolmdb = "1.8.2"
val tapir = "1.11.7"
val logback = "1.5.10"
}
val sharedSettings = Seq(
releasePublishArtifactsAction := PgpKeys.publishSigned.value, // MUST BE SET HERE TO TRIGGER THIS REQUIREMENT
Test / fork := true,
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
scalacOptions ++= Seq("-deprecation"), // "-Xfatal-warnings",
// excludeDependencies += "org.scala-lang.modules" % "scala-collection-compat_2.13",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % versions.zio,
"dev.zio" %% "zio-test" % versions.zio % Test,
"dev.zio" %% "zio-test-sbt" % versions.zio % Test
)
)
lazy val dictionary =
project
.in(file("dictionary"))
.settings(
name := "zwords-dictionary",
description := "Dictionary management",
sharedSettings,
libraryDependencies ++= Seq(
"dev.zio" %% "zio-config" % versions.zioconfig,
"dev.zio" %% "zio-config-typesafe" % versions.zioconfig,
"dev.zio" %% "zio-config-magnolia" % versions.zioconfig,
"dev.zio" %% "zio-nio" % versions.zionio
)
)
lazy val wordGenerator =
project
.in(file("wordgen"))
.dependsOn(dictionary)
.settings(
name := "zwords-word-generator",
description := "generate word candidate from dictionary",
sharedSettings,
libraryDependencies ++= Seq(
"dev.zio" %% "zio-json" % versions.ziojson
)
)
lazy val gameLogic =
project
.in(file("gamelogic"))
.dependsOn(wordGenerator)
.settings(
name := "zwords-game-logic",
description := "the sutom/motus game logic",
sharedSettings
)
lazy val consoleUI =
project
.in(file("console"))
.dependsOn(gameLogic)
.dependsOn(wordGenerator)
.dependsOn(dictionary)
.settings(
name := "zwords-console",
description := "Play zwords from the console",
sharedSettings
)
lazy val webapi =
project
.in(file("webapi"))
.dependsOn(gameLogic)
.dependsOn(wordGenerator)
.dependsOn(dictionary)
.enablePlugins(JavaServerAppPackaging)
.settings(
name := "zwords-webapi",
description := "zwords sutom/motus game REST API",
Universal / javaOptions := Seq( // -- Required for LMDB with recent JVM
"--add-opens",
"java.base/java.nio=ALL-UNNAMED",
"--add-opens",
"java.base/sun.nio.ch=ALL-UNNAMED"
),
Test / javaOptions := Seq( // -- Required for LMDB with recent JVM
"--add-opens",
"java.base/java.nio=ALL-UNNAMED",
"--add-opens",
"java.base/sun.nio.ch=ALL-UNNAMED"
),
sharedSettings,
libraryDependencies ++= Seq(
"dev.zio" %% "zio-logging" % versions.ziologging,
"dev.zio" %% "zio-logging-slf4j" % versions.ziologging,
"com.softwaremill.sttp.tapir" %% "tapir-zio" % versions.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % versions.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % versions.tapir,
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % versions.tapir,
"fr.janalyse" %% "zio-lmdb" % versions.ziolmdb,
"ch.qos.logback" % "logback-classic" % versions.logback
)
)
ThisBuild / homepage := Some(url("https://github.com/dacr/sotohp"))
ThisBuild / scmInfo := Some(ScmInfo(url(s"https://github.com/dacr/zwords.git"), s"[email protected]:dacr/zwords.git"))
ThisBuild / developers := List(
Developer(
id = "dacr",
name = "David Crosson",
email = "[email protected]",
url = url("https://github.com/dacr")
)
)