diff --git a/build.sbt b/build.sbt index 48d4993..b43a3f2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,45 +1,14 @@ 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" +ThisBuild / scalaVersion := scala3 +ThisBuild / versionScheme := Some("semver-spec") +ThisBuild / gsProjectName := "gs-config" 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 @@ -49,29 +18,10 @@ lazy val testSettings = Seq( lazy val `gs-config` = project .in(file(".")) .settings(sharedSettings) - .settings(publishSettings) .settings(testSettings) - .settings(name := s"$ProjectName-v${semVerMajor.value}") + .settings(name := s"${gsProjectName.value}-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. -) diff --git a/project/plugins.sbt b/project/plugins.sbt index 23828a3..96d399c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,4 +6,5 @@ externalResolvers := Seq( ) addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.8") -addSbtPlugin("gs" % "gs-semver-sbt-plugin" % "0.1.1") +addSbtPlugin("gs" % "sbt-garrity-software" % "0.2.0") +addSbtPlugin("gs" % "sbt-gs-semver" % "0.2.0")