Skip to content

Commit

Permalink
Switch from publishing to Bintray to Sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmay committed Apr 16, 2021
1 parent f74e205 commit 2b70682
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ import sbt.Test

// Aggregate root project settings only
name := "scalacheck-ops-root"
scalaVersion := Scala_2_13

ThisBuild / organization := "com.rallyhealth"
ThisBuild / organizationName := "Rally Health"

scalaVersion := Scala_2_13
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))

// reload sbt when the build files change
Global / onChangedBuildSource := ReloadOnSourceChanges

ThisBuild / bintrayOrganization := Some("rallyhealth")
ThisBuild / bintrayRepository := "maven"

// TODO: Remove this after it is no longer needed for checking binary compatibility
ThisBuild / resolvers += Resolver.bintrayRepo("rallyhealth", "maven")

developers := List(
Developer(id = "jeffmay", name = "Jeff May", email = "jeff.n.may@gmail.com", url = url("https://github.com/jeffmay")),
)

// don't look for previous versions of the root project, they don't exist
mimaFailOnNoPrevious := false

Expand Down
7 changes: 1 addition & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
resolvers += Resolver.url(
"bintray-sbt-plugin-releases",
url("https://dl.bintray.com/content/sbt/sbt-plugin-releases")
)(Resolver.ivyStylePatterns)

addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
22 changes: 22 additions & 0 deletions sonatype.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Your profile name of the sonatype account. The default is the same with the organization value
sonatypeProfileName := "com.rallyhealth"

// To sync with Maven central, you need to supply the following information:
publishMavenStyle := true

// publish to Maven Central
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / publishTo := Some {
if (isSnapshot.value)
Resolver.url("Sonatype", url("https://s01.oss.sonatype.org/content/repositories/snapshots"))
else
Resolver.url("Sonatype", url("https://s01.oss.sonatype.org/content/repositories/releases"))
}

// add SNAPSHOT to non-release versions so they are not published to the main repo
ThisBuild / dynverSonatypeSnapshots := true
// Use '-' instead of '+' for simpler snapshot URLs
ThisBuild / dynverSeparator := "-"

import xerial.sbt.Sonatype.GitHubHosting
sonatypeProjectHosting := Some(GitHubHosting("rallyhealth", "scalacheck-ops", "jeff.n.may@gmail.com"))

0 comments on commit 2b70682

Please sign in to comment.