Skip to content

Commit 99262e5

Browse files
committed
Update sbt-sonatype setup
1 parent d464cb4 commit 99262e5

File tree

1 file changed

+11
-29
lines changed

1 file changed

+11
-29
lines changed

build.sbt

+11-29
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import java.net.URL
22

33
import sbt.Keys.{licenses, startYear, version}
4+
import xerial.sbt.Sonatype.GitHubHosting
45
// @formatter:off
56

67
name := "ijp-debayer2sx"
78

8-
val _version = "1.0.1"
9-
9+
lazy val _version = "1.0.1"
1010
lazy val _scalaVersions = Seq("2.13.1", "2.12.10")
11-
lazy val _scalaVersion = _scalaVersions.head
11+
lazy val _scalaVersion = _scalaVersions.head
1212

13-
scalaVersion := _scalaVersion
13+
version := _version
14+
scalaVersion := _scalaVersion
1415
publishArtifact := false
1516
skip in publish := true
17+
sonatypeProfileName := "net.sf.ij-plugins"
1618

1719
val commonSettings = Seq(
1820
homepage := Some(new URL("https://github.com/ij-plugins/ijp-DeBayer2SX")),
@@ -50,33 +52,13 @@ val commonSettings = Seq(
5052
fork := true,
5153
//
5254
manifestSetting,
53-
publishSetting,
54-
pomExtra :=
55-
<scm>
56-
<url>https://github.com/ij-plugins/ijp-DeBayer2SX</url>
57-
<connection>scm:https://github.com/ij-plugins/ijp-DeBayer2SX.git</connection>
58-
</scm>
59-
<developers>
60-
<developer>
61-
<id>jpsacha</id>
62-
<name>Jarek Sacha</name>
63-
<url>https://github.com/jpsacha</url>
64-
</developer>
65-
</developers>
55+
// Setup publishing
56+
publishMavenStyle := true,
57+
sonatypeProfileName := "net.sf.ij-plugins",
58+
sonatypeProjectHosting := Some(GitHubHosting("ij-plugins", "ijp-debayer2sx", "[email protected]")),
59+
publishTo := sonatypePublishTo.value,
6660
)
6761

68-
// Resolvers
69-
lazy val sonatypeNexusSnapshots = Resolver.sonatypeRepo("snapshots")
70-
lazy val sonatypeNexusStaging = "Sonatype Nexus Staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
71-
72-
lazy val publishSetting = publishTo := {
73-
val version: String = _version
74-
if (version.trim.endsWith("SNAPSHOT"))
75-
Some(sonatypeNexusSnapshots)
76-
else
77-
Some(sonatypeNexusStaging)
78-
}
79-
8062
lazy val ijp_debayer2sx_core = project.in(file("ijp-debayer2sx-core"))
8163
.settings(commonSettings,
8264
name := "ijp-debayer2sx-core",

0 commit comments

Comments
 (0)