sbt-garrity-software/src/main/scala/gs/GsPlugin.scala

41 lines
1.1 KiB
Scala

package gs
import sbt._
import sbt.Keys._
object GsPlugin extends AutoPlugin {
override def trigger = allRequirements
val autoImport = GsKeys
import autoImport._
override def projectSettings: Seq[Setting[_]] = Seq(
publishMavenStyle := true,
Test / Keys.publishArtifact := false,
pomIncludeRepository := Function.const(false),
scmInfo := Some(
ScmInfo(
browseUrl = url(Gs.gitRepo(gsProjectName.value)),
connection = Gs.gitSsh(gsProjectName.value)
)
),
licenses := List(Gs.Apache2),
homepage := Some(url(Gs.gitRepo(gsProjectName.value))),
organizationName := "garrity software",
organization := "gs",
organizationHomepage := Some(url("https://garrity.co/")),
publishTo := {
val repo = "https://maven.garrity.co/"
if (Keys.version.value.endsWith("SNAPSHOT"))
Some("Garrity Software Maven" at repo + "snapshots")
else
Some("Garrity Software Maven" at repo + "releases")
},
scalacOptions := {
val prev = Keys.scalacOptions.value
prev ++ Gs.CompilerOptions
}
)
}