Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,19 @@ def versionSetting: Def.Initialize[String] = Def.setting(
)
)

def publishSettings: List[Setting[?]] = pgpSettings ++: List(
// Maven-native snapshot deployment via sbt-aether-deploy (timestamped SNAPSHOTs with maven-metadata.xml)
def aetherSettings: List[Setting[?]] = List(
credentials ++= {
val user = sys.env.get("SONATYPE_USERNAME")
val pass = sys.env.get("SONATYPE_PASSWORD")
(user, pass) match {
case (Some(u), Some(p)) => List(Credentials("central-snapshots", "central.sonatype.com", u, p))
case _ => Nil
}
}
)

def publishSettings: List[Setting[?]] = pgpSettings ++: aetherSettings ++: List(
packageOptions += Package.ManifestAttributes(
"Build-Jdk" -> System.getProperty("java.version"),
"Specification-Title" -> name.value,
Expand Down
4 changes: 4 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.6")
addSbtPlugin("com.github.sbt" % "sbt-header" % "5.11.0")

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
addSbtPlugin("no.arktekk.sbt" % "aether-deploy-signed" % "0.30.0")
// maven-resolver-supplier 1.9.23 (via aether-deploy) needs plexus-utils at runtime but doesn't declare it
// https://github.com/arktekk/sbt-aether-deploy/issues/43
dependencyOverrides += "org.codehaus.plexus" % "plexus-utils" % "3.6.0"