75 lines
2 KiB
Scala
75 lines
2 KiB
Scala
ThisBuild / scalaVersion := "3.8.4"
|
|
ThisBuild / organizationName := "garrity software"
|
|
ThisBuild / organization := "gs"
|
|
ThisBuild / versionScheme := Some("semver-spec")
|
|
|
|
/* externalResolvers := Seq( "Garrity Software Releases" at
|
|
* "https://maven.garrity.co/gs", "Garrity Software Maven Mirror" at
|
|
* "https://maven.garrity.co/releases" ) */
|
|
|
|
resolvers += Resolver.mavenLocal
|
|
|
|
val ProjectName: String = "sbt-gs-semver"
|
|
val Description: String = "SBT 2.0.0+ plugin for Git-based semantic versioning."
|
|
|
|
val CurrentVersion: String = "0.4.0-SNAPSHOT"
|
|
|
|
def isRelease(): Boolean =
|
|
!CurrentVersion.contains("SNAPSHOT")
|
|
|
|
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(
|
|
"MIT" -> url(
|
|
s"https://git.garrity.co/garrity-software/$ProjectName/LICENSE"
|
|
)
|
|
),
|
|
homepage := Some(
|
|
url(s"https://git.garrity.co/garrity-software/$ProjectName")
|
|
),
|
|
publishTo := {
|
|
val repo = "https://maven.garrity.co/"
|
|
if (!isRelease())
|
|
Some("Garrity Software Maven" at repo + "snapshots")
|
|
else
|
|
Some("Garrity Software Maven" at repo + "gs")
|
|
}
|
|
)
|
|
|
|
lazy val root = Project(ProjectName, file("."))
|
|
.enablePlugins(SbtPlugin)
|
|
.settings(publishSettings)
|
|
.settings(
|
|
name := ProjectName,
|
|
version := CurrentVersion,
|
|
libraryDependencies ++= Seq(
|
|
"com.lihaoyi" %% "os-lib" % "0.9.3"
|
|
),
|
|
pluginCrossBuild / sbtVersion := {
|
|
"2.0.0"
|
|
},
|
|
scalacOptions := Seq(
|
|
"-encoding",
|
|
"utf8",
|
|
"-deprecation",
|
|
"-feature",
|
|
"-explain",
|
|
"-unchecked",
|
|
"-explain-types",
|
|
"-language:strictEquality",
|
|
"-Wunused:implicits",
|
|
"-Wunused:explicits",
|
|
"-Wunused:imports",
|
|
"-Wunused:locals",
|
|
"-Wunused:privates"
|
|
)
|
|
)
|