From 11a4549f482111a251b4d6f142cd028834d5b59e Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Sun, 7 Sep 2025 22:45:24 -0400 Subject: [PATCH] Cross build to sbt 2.0.0-RC4 --- build.sbt | 11 +++++++++-- project/common.scala | 8 -------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/build.sbt b/build.sbt index 88588a60..22bb26c7 100644 --- a/build.sbt +++ b/build.sbt @@ -17,6 +17,12 @@ ThisBuild / developers := List( url = url("http://eed3si9n.com") ) ) +ThisBuild / publishTo := { + val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" + val v = (ThisBuild / version).value + if (v.endsWith("SNAPSHOT")) Some("central-snapshots" at centralSnapshots) + else localStaging.value +} lazy val commonSettings = Seq( scalacOptions := Seq("-deprecation", "-unchecked", "-feature", "-language:implicitConversions", "-language:postfixOps"), @@ -43,7 +49,8 @@ lazy val root = (project in file(".")) commands += Command.command("release") { state => "clean" :: "+app/publishSigned" :: - "++2.12.20!;scalaxbPlugin/publishSigned" :: + "++2.12.x;scalaxbPlugin/publishSigned" :: + "++3.x;scalaxbPlugin/publishSigned" :: state } }) @@ -95,7 +102,7 @@ lazy val scalaxbPlugin = (project in file("sbt-scalaxb")) pluginCrossBuild / sbtVersion := { scalaBinaryVersion.value match { case "2.12" => "1.5.8" // set minimum sbt version - case _ => "2.0.0-RC3" + case _ => "2.0.0-RC4" } } crossScalaVersions := Seq(scala212, scala3ForSbt) diff --git a/project/common.scala b/project/common.scala index c9aeb649..e8acbd84 100644 --- a/project/common.scala +++ b/project/common.scala @@ -52,13 +52,5 @@ object Common { val sonatypeSettings: Seq[Def.Setting[_]] = Seq( Test / publishArtifact := false, - resolvers ++= Seq( - "sonatype-public" at "https://oss.sonatype.org/content/repositories/public"), - publishTo := { - val v = version.value - val nexus = "https://oss.sonatype.org/" - if (v.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") - else Some("releases" at nexus + "service/local/staging/deploy/maven2") - } ) }