Skip to content

Commit

Permalink
Update sbt-sonatype setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsacha committed Sep 20, 2019
1 parent d464cb4 commit 99262e5
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import java.net.URL

import sbt.Keys.{licenses, startYear, version}
import xerial.sbt.Sonatype.GitHubHosting
// @formatter:off

name := "ijp-debayer2sx"

val _version = "1.0.1"

lazy val _version = "1.0.1"
lazy val _scalaVersions = Seq("2.13.1", "2.12.10")
lazy val _scalaVersion = _scalaVersions.head
lazy val _scalaVersion = _scalaVersions.head

scalaVersion := _scalaVersion
version := _version
scalaVersion := _scalaVersion
publishArtifact := false
skip in publish := true
sonatypeProfileName := "net.sf.ij-plugins"

val commonSettings = Seq(
homepage := Some(new URL("https://github.com/ij-plugins/ijp-DeBayer2SX")),
Expand Down Expand Up @@ -50,33 +52,13 @@ val commonSettings = Seq(
fork := true,
//
manifestSetting,
publishSetting,
pomExtra :=
<scm>
<url>https://github.com/ij-plugins/ijp-DeBayer2SX</url>
<connection>scm:https://github.com/ij-plugins/ijp-DeBayer2SX.git</connection>
</scm>
<developers>
<developer>
<id>jpsacha</id>
<name>Jarek Sacha</name>
<url>https://github.com/jpsacha</url>
</developer>
</developers>
// Setup publishing
publishMavenStyle := true,
sonatypeProfileName := "net.sf.ij-plugins",
sonatypeProjectHosting := Some(GitHubHosting("ij-plugins", "ijp-debayer2sx", "[email protected]")),
publishTo := sonatypePublishTo.value,
)

// Resolvers
lazy val sonatypeNexusSnapshots = Resolver.sonatypeRepo("snapshots")
lazy val sonatypeNexusStaging = "Sonatype Nexus Staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"

lazy val publishSetting = publishTo := {
val version: String = _version
if (version.trim.endsWith("SNAPSHOT"))
Some(sonatypeNexusSnapshots)
else
Some(sonatypeNexusStaging)
}

lazy val ijp_debayer2sx_core = project.in(file("ijp-debayer2sx-core"))
.settings(commonSettings,
name := "ijp-debayer2sx-core",
Expand Down

0 comments on commit 99262e5

Please sign in to comment.