gs-config/build.sbt

77 lines
2.7 KiB
Scala

val scala3: String = "3.3.1"
ThisBuild / organizationName := "garrity software"
ThisBuild / organization := "gs"
ThisBuild / organizationHomepage := Some(url("https://garrity.co/"))
ThisBuild / scalaVersion := scala3
ThisBuild / versionScheme := Some("semver-spec")
val ProjectName: String = "gs-config"
val Description: String = "Garrity Software Configuration Library"
lazy val sharedSettings = Seq(
scalaVersion := scala3,
version := semVerSelected.value
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := Function.const(false),
scmInfo := Some(
ScmInfo(
url(s"https://git.garrity.co/garrity-software/$ProjectName"),
s"git@git.garrity.co:garrity-software/$ProjectName.git"
)
),
description := Description,
licenses := List(
"Apache 2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")
),
homepage := Some(
url(s"https://git.garrity.co/garrity-software/$ProjectName")
),
publishTo := {
val repo = "https://maven.garrity.co/"
if (semVerSnapshot.value)
Some("Garrity Software Maven" at repo + "snapshots")
else
Some("Garrity Software Maven" at repo + "releases")
}
)
lazy val testSettings = Seq(
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % "1.0.0-M10" % Test
)
)
lazy val `gs-config` = project
.in(file("."))
.settings(sharedSettings)
.settings(publishSettings)
.settings(testSettings)
.settings(name := s"$ProjectName-v${semVerMajor.value}")
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "3.5.2"
)
)
ThisBuild / scalacOptions ++= Seq(
"-encoding",
"utf8", // Set source file character encoding.
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-explain", // Explain errors in more detail.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
"-explain-types", // Explain type errors in more detail.
"-Xfatal-warnings", // Fail the compilation if there are any warnings.
"-language:strictEquality", // Enable multiversal equality (require CanEqual)
"-Wunused:implicits", // Warn if an implicit parameter is unused.
"-Wunused:explicits", // Warn if an explicit parameter is unused.
"-Wunused:imports", // Warn if an import selector is not referenced.
"-Wunused:locals", // Warn if a local definition is unused.
"-Wunused:privates", // Warn if a private member is unused.
"-Ysafe-init" // Enable the experimental safe initialization check.
)