diff --git a/main/src/main/scala/sbt/Opts.scala b/main/src/main/scala/sbt/Opts.scala index ca271448dd..40281553b6 100644 --- a/main/src/main/scala/sbt/Opts.scala +++ b/main/src/main/scala/sbt/Opts.scala @@ -16,6 +16,7 @@ import java.net.URL import sbt.io.Path import Path._ +import scala.annotation.nowarn /** Options for well-known tasks. */ object Opts { @@ -42,22 +43,52 @@ object Opts { } object resolver { import sbt.io.syntax._ - @deprecated("Use sonatypeOssReleases instead", "1.7.0") + @deprecated("Sonatype OSS Repository Hosting (OSSRH) will be sunset on 2025-06-30", "1.7.0") val sonatypeReleases = Resolver.sonatypeRepo("releases") + + @deprecated("Sonatype OSS Repository Hosting (OSSRH) will be sunset on 2025-06-30", "1.11.2") val sonatypeOssReleases = Resolver.sonatypeOssRepos("releases") - @deprecated("Use sonatypeOssSnapshots instead", "1.7.0") + @deprecated( + """Sonatype OSS Repository Hosting (OSSRH) will be sunset on 2025-06-30; use the following instead: + resolvers += Resolver.sonatypeCentralSnapshots""", + "1.7.0" + ) val sonatypeSnapshots = Resolver.sonatypeRepo("snapshots") + + @deprecated( + """Sonatype OSS Repository Hosting (OSSRH) will be sunset on 2025-06-30; use the following instead: + resolvers += Resolver.sonatypeCentralSnapshots""", + "1.11.2" + ) val sonatypeOssSnapshots = Resolver.sonatypeOssRepos("snapshots") + @deprecated( + """Sonatype OSS Repository Hosting (OSSRH) will be sunset on 2025-06-30; use the following instead: + publishTo := { + if (isSnapshot.value) Some(Resolver.sonatypeCentralSnapshots) + else localStaging.value + }""", + "1.11.2" + ) val sonatypeStaging = MavenRepository( "sonatype-staging", "https://oss.sonatype.org/service/local/staging/deploy/maven2" ) + val mavenLocalFile = Resolver.file("Local Repository", userHome / ".m2" / "repository")( Resolver.defaultPatterns ) + @deprecated( + """Bintray was shut down""", + "1.11.2" + ) val sbtSnapshots = Resolver.bintrayRepo("sbt", "maven-snapshots") + + @deprecated( + """Bintray was shut down""", + "1.11.2" + ) val sbtIvySnapshots = Resolver.bintrayIvyRepo("sbt", "ivy-snapshots") } } @@ -77,10 +108,14 @@ object DefaultOptions { doc.title(name) ++ doc.version(version) def resolvers(snapshot: Boolean): Vector[Resolver] = { - if (snapshot) Vector(resolver.sbtSnapshots) else Vector.empty + if (snapshot) Vector(resolver.sbtSnapshots: @nowarn("cat=deprecation")) else Vector.empty } def pluginResolvers(plugin: Boolean, snapshot: Boolean): Vector[Resolver] = { - if (plugin && snapshot) Vector(resolver.sbtSnapshots, resolver.sbtIvySnapshots) + if (plugin && snapshot) + Vector( + resolver.sbtSnapshots: @nowarn("cat=deprecation"), + resolver.sbtIvySnapshots: @nowarn("cat=deprecation"), + ) else Vector.empty } def addResolvers: Setting[_] = Keys.resolvers ++= { resolvers(Keys.isSnapshot.value) } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 2d69ed3be8..6564f942b1 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -14,7 +14,7 @@ object Dependencies { // sbt modules private val ioVersion = nightlyVersion.getOrElse("1.10.5") private val lmVersion = - sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.11.0") + sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.11.2") val zincVersion = nightlyVersion.getOrElse("1.10.8") private val sbtIO = "org.scala-sbt" %% "io" % ioVersion @@ -77,7 +77,7 @@ object Dependencies { def addSbtZincCompile = addSbtModule(sbtZincPath, "zincCompile", zincCompile) def addSbtZincCompileCore = addSbtModule(sbtZincPath, "zincCompileCore", zincCompileCore) - val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.1.9" + val lmCoursierShaded = "io.get-coursier" %% "lm-coursier-shaded" % "2.1.10" def sjsonNew(n: String) = Def.setting("com.eed3si9n" %% n % "0.10.1") // contrabandSjsonNewVersion.value diff --git a/sbt b/sbt index 78aa4a2ca0..46894c7b61 100755 --- a/sbt +++ b/sbt @@ -1,7 +1,7 @@ #!/usr/bin/env bash set +e -declare builtin_sbt_version="1.11.1" +declare builtin_sbt_version="1.11.2" declare -a residual_args declare -a java_args declare -a scalac_args