Skip to content

Commit 5b12a0f

Browse files
committed
project: upgrade the sonatype publishing
1 parent 2212699 commit 5b12a0f

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

build.sbt

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ val commonSettings =
7171
coreDefaultSettings ++
7272
specs2Settings ++
7373
compilationSettings ++
74-
testingSettings ++
75-
publicationSettings
74+
testingSettings
7675

7776
def commonJvmSettings =
7877
testingJvmSettings
@@ -512,28 +511,38 @@ lazy val providedDependenciesInAggregate = Seq("shapeless")
512511
/**
513512
* PUBLICATION
514513
*/
515-
lazy val publicationSettings = Seq(
516-
Global / publishTo := sonatypePublishToBundle.value,
517-
publishMavenStyle := true,
518-
Test / publishArtifact := false,
519-
pomIncludeRepository := { x => false },
520-
pomExtra := (
521-
<url>http://specs2.org/</url>
522-
<licenses>
523-
<license>
524-
<name>MIT-style</name>
525-
<url>http://www.opensource.org/licenses/mit-license.php</url>
526-
<distribution>repo</distribution>
527-
</license>
528-
</licenses>
529-
<developers>
530-
<developer>
531-
<id>etorreborre</id>
532-
<name>Eric Torreborre</name>
533-
<url>http://etorreborre.blogspot.com/</url>
534-
</developer>
535-
</developers>
536-
),
537-
credentials := Seq(Credentials(Path.userHome / ".sbt" / "specs2.credentials"))
538-
) ++
539-
Sonatype.projectSettings
514+
ThisBuild / credentials := Seq(Credentials(Path.userHome / ".sbt" / "specs2.credentials"))
515+
ThisBuild / organizationName := "specs2"
516+
ThisBuild / organizationHomepage := Some(url("http://specs2.org/"))
517+
518+
ThisBuild / scmInfo := Some(
519+
ScmInfo(
520+
url("https://github.com/etorreborre/specs2"),
521+
"scm:git@github.com:etorreborre/specs2.git"
522+
)
523+
)
524+
ThisBuild / developers := List(
525+
Developer(
526+
id = "etorreborre",
527+
name = "Eric Torreborre",
528+
email = "etorreborre@yahoo.com",
529+
url = url("http://github.com/etorreborre")
530+
)
531+
)
532+
533+
ThisBuild / description := "software specifications for Scala"
534+
ThisBuild / licenses := List(
535+
"MIT" -> java.net.URI.create("https://opensource.org/license/mit").toURL()
536+
)
537+
ThisBuild / homepage := Some(url("https://github.com/etorreborre/specs2"))
538+
539+
// Remove all additional repository other than Maven Central from POM
540+
ThisBuild / pomIncludeRepository := { _ => false }
541+
ThisBuild / publishMavenStyle := true
542+
543+
// new setting for the Central Portal
544+
ThisBuild / publishTo := {
545+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
546+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
547+
else localStaging.value
548+
}

project/plugins.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.9.0")
1010
addSbtPlugin("com.github.sbt" % "sbt-site" % "1.7.0")
1111
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.1")
1212
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.1.0")
13-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
1413
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
1514
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.28.0")
1615

0 commit comments

Comments
 (0)