From 7f354e3519fe2ca38b499d3323bc8d3d111b95d0 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Wed, 2 Jun 2021 13:38:03 +0100 Subject: [PATCH] Maven Central publishing --- .travis.yml | 2 +- RELEASING.md | 9 ++++++++- build.sbt | 3 +-- plugin/project/build.properties | 1 - plugin/project/plugins.sbt | 17 ----------------- project/plugins.sbt | 1 - 6 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 plugin/project/build.properties delete mode 100644 plugin/project/plugins.sbt diff --git a/.travis.yml b/.travis.yml index f5fe16b..e974c3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ jobs: - stage: publish script: - - sbt publish + - sbt publishSigned stages: # runs on master commits and PRs diff --git a/RELEASING.md b/RELEASING.md index 6a58f23..c8702eb 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,10 +1,17 @@ ### Releasing +See the [prerequisites](#prerequisites) if this is your first release. + 1. Check [closed issues without a milestone](https://github.com/sbt/sbt-java-formatter/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20no%3Amilestone) and either assign them the upcoming release milestone or 'invalid' 1. Create a [new release](https://github.com/sbt/sbt-java-formatter/releases/new) with: * the next tag version (e.g. `v0.4.0`) * title and release description including notable changes * link to the [milestone](https://github.com/sbt/sbt-java-formatter/milestones) showing an overview of closed issues for this release * overview of contributors generated by [`sbt-authors`](https://github.com/2m/authors) -1. Travis CI will start a [CI build](https://travis-ci.org/sbt/sbt-java-formatter/builds) for the new tag and publish artifacts to Bintray +1. Travis CI will start a [CI build](https://travis-ci.org/sbt/sbt-java-formatter/builds) for the new tag and publish artifacts to Sonatype +1. Close/Release the staging repository on oss.sonatype.org. 1. Close the milestone for this release and create a new one + +## Prerequisites + +* You need oss.sontaype.org publish permissions by means of a request to [OSSRH-1324](https://issues.sonatype.org/browse/OSSRH-1324). diff --git a/build.sbt b/build.sbt index 099a91d..538dcf1 100644 --- a/build.sbt +++ b/build.sbt @@ -13,8 +13,7 @@ lazy val plugin = project startYear := Some(2015), description := "Formats Java code in your project.", licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")), - bintrayRepository := "sbt-plugins", - bintrayOrganization := Some("ktosopl"), + publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging), crossSbtVersions := List("1.3.0"), scalacOptions ++= Seq("-encoding", "UTF-8", "-unchecked", "-deprecation", "-feature"), javacOptions ++= Seq("-encoding", "UTF-8"), diff --git a/plugin/project/build.properties b/plugin/project/build.properties deleted file mode 100644 index 94005e5..0000000 --- a/plugin/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.0.0 diff --git a/plugin/project/plugins.sbt b/plugin/project/plugins.sbt deleted file mode 100644 index 3fd452a..0000000 --- a/plugin/project/plugins.sbt +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2016 Lightbend Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value diff --git a/project/plugins.sbt b/project/plugins.sbt index a4905e4..8e33695 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,6 @@ addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value