Skip to content

Commit bb3f96a

Browse files
committed
Using plugin to release on sonatype's repo.
1 parent 1912654 commit bb3f96a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build.sbt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ lazy val commonSettings = Seq(
1818
javaOptions ++= Seq("-Xmx512m", "-Djava.awt.headless=true"),
1919
scalacOptions ++= Seq("-deprecation", "-unchecked"),
2020
credentials += Credentials(Path.userHome / ".sbt" / "sonatype.credentials"),
21-
publishTo := {
22-
val nexus = "https://oss.sonatype.org/"
23-
if (version.value.trim.endsWith("SNAPSHOT"))
24-
Some("snapshots" at nexus + "content/repositories/snapshots")
25-
else
26-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
27-
},
21+
publishTo := Some(
22+
if (isSnapshot.value) Opts.resolver.sonatypeSnapshots
23+
else Opts.resolver.sonatypeStaging
24+
),
2825
publishMavenStyle := true,
2926
publishArtifact in Test := false,
3027
pomIncludeRepository := { _ => false },

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "2.0.0")
2+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
3+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")

0 commit comments

Comments
 (0)