From 5ef85e2e714b946b525c28838d52bb16a0e1bf85 Mon Sep 17 00:00:00 2001 From: Marcos Pereira Date: Tue, 19 Nov 2019 18:19:41 -0500 Subject: [PATCH 1/2] Fix release process Two major problems: 1. It was not promoting the staged repository 2. It was generating two staged repositories This should fix both by using the defaults provided by interplay. (cherry picked from commit 72e7dc8d9e3e6426f2392e2047f2d4d3b3245a6d) --- build.sbt | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/build.sbt b/build.sbt index 81600faa6..f1b9cb6fb 100644 --- a/build.sbt +++ b/build.sbt @@ -3,22 +3,22 @@ */ import sbt._ import sbt.util._ -import scala.sys.process._ import sbt.io.Path._ import interplay.ScalaVersions -import ReleaseTransformations._ -import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaKeys.mimaBinaryIssueFilters import com.typesafe.tools.mima.plugin.MimaKeys.mimaPreviousArtifacts -import sbtcrossproject.crossProject +import sbtcrossproject.CrossPlugin.autoImport.crossProject import sbtcrossproject.CrossType resolvers ++= DefaultOptions.resolvers(snapshot = true) +playBuildRepoName in ThisBuild := "play-json" +publishTo in ThisBuild := sonatypePublishToBundle.value + val specsBuild = Def.setting[Seq[ModuleID]] { val specsVersion = CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 10)) => "3.9.1" @@ -104,12 +104,6 @@ lazy val commonSettings = Def.settings( // Filtering tests that are not stable in Scala 2.13 yet. Tests.Argument(TestFrameworks.ScalaTest, "-l", "play.api.libs.json.UnstableInScala213") ), - publishTo := Some( - if (isSnapshot.value) - Opts.resolver.sonatypeSnapshots - else - Opts.resolver.sonatypeStaging - ), headerLicense := { val currentYear = java.time.Year.now(java.time.Clock.systemUTC).getValue Some( @@ -132,7 +126,7 @@ lazy val commonSettings = Def.settings( lazy val root = project .in(file(".")) - .enablePlugins(PlayRootProject, ScalaJSPlugin) + .enablePlugins(PlayRootProject, ScalaJSPlugin, PlayNoPublish) .aggregate( `play-jsonJS`, `play-jsonJVM`, @@ -140,10 +134,7 @@ lazy val root = project `play-functionalJVM`, `play-json-joda` ) - .settings( - commonSettings, - publishTo := None - ) + .settings(commonSettings) lazy val `play-json` = crossProject(JVMPlatform, JSPlatform) .crossType(CrossType.Full) @@ -291,21 +282,4 @@ lazy val docs = project .settings(commonSettings) .dependsOn(`play-jsonJVM`) -playBuildRepoName in ThisBuild := "play-json" - -releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - runClean, - runTest, - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - setNextVersion, - commitNextVersion, - releaseStepCommand("+sonatypeReleaseAll"), - pushChanges -) - addCommandAlias("validateCode", ";headerCheck;test:headerCheck;+scalafmtCheckAll;scalafmtSbtCheck") From 507a26a4565f2ac49efdd87c7a8abfe7547e6b91 Mon Sep 17 00:00:00 2001 From: Ignasi Marimon-Clos Date: Fri, 22 Nov 2019 18:09:13 +0100 Subject: [PATCH 2/2] Remove offending plugin. Reorder project definition (cherry picked from commit 96e07d23e6d29b99c18db022b776f1e42118c8f6) --- build.sbt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index f1b9cb6fb..f72bebd8d 100644 --- a/build.sbt +++ b/build.sbt @@ -126,7 +126,7 @@ lazy val commonSettings = Def.settings( lazy val root = project .in(file(".")) - .enablePlugins(PlayRootProject, ScalaJSPlugin, PlayNoPublish) + .enablePlugins(PlayRootProject, ScalaJSPlugin) .aggregate( `play-jsonJS`, `play-jsonJVM`, @@ -219,15 +219,7 @@ lazy val `play-json` = crossProject(JVMPlatform, JSPlatform) ) .dependsOn(`play-functional`) -lazy val `play-json-joda` = project - .in(file("play-json-joda")) - .enablePlugins(PlayLibrary) - .settings( - commonSettings ++ playJsonMimaSettings ++ Seq( - libraryDependencies ++= joda ++ specsBuild.value.map(_ % Test) - ) - ) - .dependsOn(`play-jsonJVM`) +lazy val `play-jsonJS` = `play-json`.js lazy val `play-jsonJVM` = `play-json`.jvm.settings( libraryDependencies ++= @@ -238,7 +230,15 @@ lazy val `play-jsonJVM` = `play-json`.jvm.settings( unmanagedSourceDirectories in Test ++= (baseDirectory.value.getParentFile.getParentFile / "docs/manual/working/scalaGuide" ** "code").get ) -lazy val `play-jsonJS` = `play-json`.js +lazy val `play-json-joda` = project + .in(file("play-json-joda")) + .enablePlugins(PlayLibrary) + .settings( + commonSettings ++ playJsonMimaSettings ++ Seq( + libraryDependencies ++= joda ++ specsBuild.value.map(_ % Test) + ) + ) + .dependsOn(`play-jsonJVM`) lazy val `play-functional` = crossProject(JVMPlatform, JSPlatform) .crossType(CrossType.Pure)