From f06ff4e6684590617c27749dadd3883f37bc8fae Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Thu, 17 Feb 2022 00:17:19 -0500 Subject: [PATCH] Publish to Sonatype --- build.sbt | 25 ++++++++++++++++++------- project/build.properties | 2 +- project/plugins.sbt | 1 - 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index eb142c2..47eb54a 100644 --- a/build.sbt +++ b/build.sbt @@ -10,16 +10,27 @@ lazy val root = (project in file(".")) .enablePlugins(SbtPlugin) .settings( name := "sbt-buildinfo", - pluginCrossBuild / sbtVersion := "1.2.8", scalacOptions := Seq("-Xlint", "-Xfatal-warnings", "-unchecked", "-deprecation", "-feature", "-language:implicitConversions"), scalacOptions += "-language:experimental.macros", libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided, - description := "sbt plugin to generate build info", - homepage := Some(url("https://github.com/sbt/sbt-buildinfo")), - licenses := Seq("MIT License" -> url("https://github.com/sbt/sbt-buildinfo/blob/master/LICENSE")), scriptedLaunchOpts ++= Seq("-Xmx1024M", "-Xss4M", "-Dplugin.version=" + version.value), scriptedBufferLog := false, - publishTo := (bintray / publishTo).value, - publishMavenStyle := false, - bintrayOrganization := Some("eed3si9n"), + (pluginCrossBuild / sbtVersion) := { + scalaBinaryVersion.value match { + case "2.12" => "1.2.8" + } + } ) + +ThisBuild / description := "sbt plugin to generate build info" +ThisBuild / licenses := Seq("MIT License" -> url("https://github.com/sbt/sbt-buildinfo/blob/master/LICENSE")) +ThisBuild / pomIncludeRepository := { _ => + false +} +ThisBuild / publishTo := { + val nexus = "https://oss.sonatype.org/" + if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") + else Some("releases" at nexus + "service/local/staging/deploy/maven2") +} +ThisBuild / publishMavenStyle := true +ThisBuild / homepage := Some(url("https://github.com/sbt/sbt-buildinfo")) diff --git a/project/build.properties b/project/build.properties index 0837f7a..c8fcab5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.13 +sbt.version=1.6.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index f1fbad2..778fa8d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1 @@ -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.0") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")