131 lines
3.4 KiB
Scala
131 lines
3.4 KiB
Scala
val scala3: String = "3.8.1"
|
|
|
|
ThisBuild / scalaVersion := scala3
|
|
ThisBuild / gsProjectName := "smolban"
|
|
|
|
ThisBuild / externalResolvers := Seq(
|
|
"Garrity Software Mirror" at "https://maven.garrity.co/releases",
|
|
"Garrity Software Releases" at "https://maven.garrity.co/gs"
|
|
)
|
|
|
|
lazy val sharedSettings = Seq(
|
|
scalaVersion := scala3,
|
|
version := calVer.value,
|
|
publish / skip := true,
|
|
publishLocal / skip := true,
|
|
publishArtifact := false
|
|
)
|
|
|
|
val Deps = new {
|
|
val Cats = new {
|
|
val Core: ModuleID = "org.typelevel" %% "cats-core" % "2.13.0"
|
|
val Effect: ModuleID = "org.typelevel" %% "cats-effect" % "3.6.3"
|
|
}
|
|
|
|
val Fs2 = new {
|
|
val Core: ModuleID = "co.fs2" %% "fs2-core" % "3.12.2"
|
|
}
|
|
|
|
val Doobie = new {
|
|
val Core: ModuleID = "org.tpolecat" %% "doobie-core" % "1.0.0-RC11"
|
|
val Hikari: ModuleID = "org.tpolecat" %% "doobie-hikari" % "1.0.0-RC11"
|
|
val Postgres: ModuleID = "org.tpolecat" %% "doobie-postgres" % "1.0.0-RC11"
|
|
}
|
|
|
|
val JdbcDriver = new {
|
|
val Sqlite: ModuleID = "org.xerial" % "sqlite-jdbc" % "3.51.1.0"
|
|
val PostgreSQL: ModuleID = "org.postgresql" % "postgresql" % "42.7.9"
|
|
}
|
|
|
|
val Http4s = new {
|
|
val Core: ModuleID = "org.http4s" %% "http4s-core" % "1.0.0-M45"
|
|
val Dsl: ModuleID = "org.http4s" %% "http4s-dsl" % "1.0.0-M45"
|
|
val EmberServer: ModuleID =
|
|
"org.http4s" %% "http4s-ember-server" % "1.0.0-M45"
|
|
}
|
|
|
|
val BouncyCastle = new {
|
|
val Provider: ModuleID = "org.bouncycastle" % "bcprov-jdk18on" % "1.83"
|
|
}
|
|
|
|
val Gs = new {
|
|
val Uuid: ModuleID = "gs" %% "gs-uuid-v0" % "0.4.2"
|
|
val Config: ModuleID = "gs" %% "gs-config-v0" % "0.2.0"
|
|
val Datagen: ModuleID = "gs" %% "gs-datagen-core-v0" % "0.4.1"
|
|
}
|
|
|
|
val MUnit: ModuleID = "org.scalameta" %% "munit" % "1.2.1"
|
|
|
|
val Slf4j = new {
|
|
val Nop: ModuleID = "org.slf4j" % "slf4j-nop" % "2.0.17"
|
|
}
|
|
}
|
|
|
|
lazy val testSettings = Seq(
|
|
libraryDependencies ++= Seq(
|
|
Deps.MUnit % Test,
|
|
Deps.Gs.Datagen % Test,
|
|
Deps.Slf4j.Nop % Test
|
|
)
|
|
)
|
|
|
|
lazy val smolban = project
|
|
.in(file("."))
|
|
.aggregate(model, db, api)
|
|
.settings(sharedSettings)
|
|
.settings(name := s"${gsProjectName.value}")
|
|
|
|
lazy val model = project
|
|
.in(file("modules/model"))
|
|
.settings(sharedSettings)
|
|
.settings(testSettings)
|
|
.settings(name := s"${gsProjectName.value}-model")
|
|
.settings(
|
|
libraryDependencies ++= Seq(
|
|
Deps.Gs.Uuid,
|
|
Deps.Cats.Core
|
|
)
|
|
)
|
|
|
|
lazy val auth = project
|
|
.in(file("modules/auth"))
|
|
.dependsOn(model)
|
|
.settings(sharedSettings)
|
|
.settings(testSettings)
|
|
.settings(name := s"${gsProjectName.value}-auth")
|
|
.settings(
|
|
libraryDependencies ++= Seq(
|
|
Deps.BouncyCastle.Provider,
|
|
Deps.Cats.Effect
|
|
)
|
|
)
|
|
|
|
lazy val db = project
|
|
.in(file("modules/db"))
|
|
.dependsOn(model, auth)
|
|
.settings(sharedSettings)
|
|
.settings(testSettings)
|
|
.settings(name := s"${gsProjectName.value}-db")
|
|
.settings(
|
|
libraryDependencies ++= Seq(
|
|
Deps.Doobie.Core,
|
|
Deps.Doobie.Hikari,
|
|
Deps.Doobie.Postgres,
|
|
Deps.JdbcDriver.Sqlite,
|
|
Deps.JdbcDriver.PostgreSQL
|
|
)
|
|
)
|
|
|
|
lazy val api = project
|
|
.in(file("modules/api"))
|
|
.dependsOn(model, auth, db)
|
|
.settings(sharedSettings)
|
|
.settings(testSettings)
|
|
.settings(name := s"${gsProjectName.value}-api")
|
|
.settings(
|
|
libraryDependencies ++= Seq(
|
|
Deps.Http4s.Core,
|
|
Deps.Http4s.Dsl,
|
|
Deps.Http4s.EmberServer
|
|
)
|
|
)
|