diff --git a/build.sbt b/build.sbt index 9ca688a..debcc56 100644 --- a/build.sbt +++ b/build.sbt @@ -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, diff --git a/project/plugins.sbt b/project/plugins.sbt index 37cadce..76b8a27 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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"