mirror of https://github.com/sbt/sbt.git
Merge pull request #8156 from eed3si9n/wip/sonatype
[1.x] update to lm 1.11.2 and deprecate sonatypeOssSnapshots
This commit is contained in:
commit
48c7700791
|
|
@ -16,6 +16,7 @@ import java.net.URL
|
||||||
|
|
||||||
import sbt.io.Path
|
import sbt.io.Path
|
||||||
import Path._
|
import Path._
|
||||||
|
import scala.annotation.nowarn
|
||||||
|
|
||||||
/** Options for well-known tasks. */
|
/** Options for well-known tasks. */
|
||||||
object Opts {
|
object Opts {
|
||||||
|
|
@ -42,22 +43,52 @@ object Opts {
|
||||||
}
|
}
|
||||||
object resolver {
|
object resolver {
|
||||||
import sbt.io.syntax._
|
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")
|
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")
|
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")
|
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")
|
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(
|
val sonatypeStaging = MavenRepository(
|
||||||
"sonatype-staging",
|
"sonatype-staging",
|
||||||
"https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
"https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||||
)
|
)
|
||||||
|
|
||||||
val mavenLocalFile = Resolver.file("Local Repository", userHome / ".m2" / "repository")(
|
val mavenLocalFile = Resolver.file("Local Repository", userHome / ".m2" / "repository")(
|
||||||
Resolver.defaultPatterns
|
Resolver.defaultPatterns
|
||||||
)
|
)
|
||||||
|
@deprecated(
|
||||||
|
"""Bintray was shut down""",
|
||||||
|
"1.11.2"
|
||||||
|
)
|
||||||
val sbtSnapshots = Resolver.bintrayRepo("sbt", "maven-snapshots")
|
val sbtSnapshots = Resolver.bintrayRepo("sbt", "maven-snapshots")
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
"""Bintray was shut down""",
|
||||||
|
"1.11.2"
|
||||||
|
)
|
||||||
val sbtIvySnapshots = Resolver.bintrayIvyRepo("sbt", "ivy-snapshots")
|
val sbtIvySnapshots = Resolver.bintrayIvyRepo("sbt", "ivy-snapshots")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -77,10 +108,14 @@ object DefaultOptions {
|
||||||
doc.title(name) ++ doc.version(version)
|
doc.title(name) ++ doc.version(version)
|
||||||
|
|
||||||
def resolvers(snapshot: Boolean): Vector[Resolver] = {
|
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] = {
|
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
|
else Vector.empty
|
||||||
}
|
}
|
||||||
def addResolvers: Setting[_] = Keys.resolvers ++= { resolvers(Keys.isSnapshot.value) }
|
def addResolvers: Setting[_] = Keys.resolvers ++= { resolvers(Keys.isSnapshot.value) }
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ object Dependencies {
|
||||||
// sbt modules
|
// sbt modules
|
||||||
private val ioVersion = nightlyVersion.getOrElse("1.10.5")
|
private val ioVersion = nightlyVersion.getOrElse("1.10.5")
|
||||||
private val lmVersion =
|
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")
|
val zincVersion = nightlyVersion.getOrElse("1.10.8")
|
||||||
|
|
||||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue