diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 1c85adef..7ada5a6b 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -32,4 +32,4 @@ jobs: sbt ';project playSwagger;clean;+test' - name: Example compile run: - cd example && sbt clean scalafmtSbtCheck scalafmtCheckAll scalafixEnable "scalafixAll --check" compile + sbt publishForExample && cd example && sbt clean scalafmtSbtCheck scalafmtCheckAll scalafixEnable "scalafixAll --check" compile diff --git a/build.sbt b/build.sbt index 4a449629..9b3263dd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,17 @@ organization in ThisBuild := "com.iheart" -scalafixDependencies in ThisBuild ++= Seq( +ThisBuild / scalafixDependencies ++= Seq( "com.github.liancheng" %% "organize-imports" % "0.6.0", "net.pixiv" %% "scalafix-pixiv-rule" % "2.4.0" ) +addCommandAlias( + "publishForExample", + ";set ThisBuild / version := \"0.0.1-EXAMPLE\"; +publishLocal" +) + lazy val noPublishSettings = Seq( - skip in publish := true, + publish / skip := true, publish := (), publishLocal := (), publishArtifact := false diff --git a/example/project/plugins.sbt b/example/project/plugins.sbt index d9a4aaf3..1309d8c7 100644 --- a/example/project/plugins.sbt +++ b/example/project/plugins.sbt @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") // play swagger plugin -addSbtPlugin("com.iheart" % "sbt-play-swagger" % "0.13.1-SNAPSHOT") +addSbtPlugin("com.iheart" % "sbt-play-swagger" % "0.0.1-EXAMPLE") diff --git a/project/Publish.scala b/project/Publish.scala index 1f712863..d14f8644 100644 --- a/project/Publish.scala +++ b/project/Publish.scala @@ -1,13 +1,11 @@ import com.jsuereth.sbtpgp.PgpKeys import xerial.sbt.Sonatype.autoImport._ import sbt._, Keys._ -import sbtrelease.ReleasePlugin.autoImport._ -import ReleaseTransformations._ object Publish { val coreSettings = Seq( - organization in ThisBuild := "com.iheart", + ThisBuild / organization := "com.iheart", publishMavenStyle := true, licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")), homepage := Some(url("http://iheartradio.github.io/play-swagger")), @@ -24,24 +22,8 @@ object Publish { ) ), pomIncludeRepository := { _ ⇒ false }, - publishArtifact in Test := false, - releaseCrossBuild := true, - publishTo := sonatypePublishToBundle.value, - releasePublishArtifactsAction := PgpKeys.publishSigned.value, - releaseProcess := Seq[ReleaseStep]( - checkSnapshotDependencies, - inquireVersions, - releaseStepCommandAndRemaining("+clean"), - releaseStepCommandAndRemaining("+test"), - setReleaseVersion, - commitReleaseVersion, - tagRelease, - releaseStepCommandAndRemaining("+publishSigned"), - releaseStepCommand("sonatypeBundleRelease"), - setNextVersion, - commitNextVersion, - pushChanges - ) + Test / publishArtifact := false, + publishTo := sonatypePublishToBundle.value ) } diff --git a/project/plugins.sbt b/project/plugins.sbt index ca3e294f..eeb9a9af 100755 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,3 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") - -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") diff --git a/version.sbt b/version.sbt deleted file mode 100644 index 82e87ae5..00000000 --- a/version.sbt +++ /dev/null @@ -1 +0,0 @@ -ThisBuild / version := "0.13.1-SNAPSHOT"