diff --git a/build.sbt b/build.sbt index f59529599..c1fbace0a 100644 --- a/build.sbt +++ b/build.sbt @@ -1057,6 +1057,7 @@ lazy val mainProj = (project in file("main")) exclude[DirectMissingMethodProblem]("sbt.Defaults.earlyArtifactPathSetting"), exclude[MissingClassProblem]("sbt.internal.server.BuildServerReporter$"), exclude[IncompatibleTemplateDefProblem]("sbt.internal.server.BuildServerReporter"), + exclude[MissingClassProblem]("sbt.internal.CustomHttp*"), ) ) .configure( diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index 82724a3b5..8f10c9dba 100644 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -43,7 +43,7 @@ import sbt.internal.librarymanagement.mavenint.{ PomExtraDependencyAttributes, SbtPomExtraProperties } -import sbt.internal.librarymanagement.{ CustomHttp => _, _ } +import sbt.internal.librarymanagement._ import sbt.internal.nio.{ CheckBuildSources, Globs } import sbt.internal.server.{ BspCompileProgress, @@ -258,8 +258,6 @@ object Defaults extends BuildCommon { artifactClassifier :== None, checksums := Classpaths.bootChecksums(appConfiguration.value), conflictManager := ConflictManager.default, - CustomHttp.okhttpClientBuilder :== CustomHttp.defaultHttpClientBuilder, - CustomHttp.okhttpClient := CustomHttp.okhttpClientBuilder.value.build, pomExtra :== NodeSeq.Empty, pomPostProcess :== idFun, pomAllRepositories :== false, @@ -2705,7 +2703,7 @@ object Defaults extends BuildCommon { def dependencyResolutionTask: Def.Initialize[Task[DependencyResolution]] = Def.taskIf { if (useCoursier.value) CoursierDependencyResolution(csrConfiguration.value) - else IvyDependencyResolution(ivyConfiguration.value, CustomHttp.okhttpClient.value) + else IvyDependencyResolution(ivyConfiguration.value) } } @@ -3129,7 +3127,7 @@ object Classpaths { else None }, dependencyResolution := dependencyResolutionTask.value, - publisher := IvyPublisher(ivyConfiguration.value, CustomHttp.okhttpClient.value), + publisher := IvyPublisher(ivyConfiguration.value), ivyConfiguration := mkIvyConfiguration.value, ivyConfigurations := { val confs = thisProject.value.configurations @@ -3432,7 +3430,7 @@ object Classpaths { private[sbt] def ivySbt0: Initialize[Task[IvySbt]] = Def.task { Credentials.register(credentials.value, streams.value.log) - new IvySbt(ivyConfiguration.value, CustomHttp.okhttpClient.value) + new IvySbt(ivyConfiguration.value) } def moduleSettings0: Initialize[Task[ModuleSettings]] = Def.task { val deps = allDependencies.value.toVector diff --git a/main/src/main/scala/sbt/Opts.scala b/main/src/main/scala/sbt/Opts.scala index 720fd0f93..25afca7fd 100644 --- a/main/src/main/scala/sbt/Opts.scala +++ b/main/src/main/scala/sbt/Opts.scala @@ -41,8 +41,14 @@ object Opts { } object resolver { import sbt.io.syntax._ + @deprecated("Use sonatypeOssReleases instead", "1.7.0") val sonatypeReleases = Resolver.sonatypeRepo("releases") + val sonatypeOssReleases = Resolver.sonatypeOssRepos("releases") + + @deprecated("Use sonatypeOssSnapshots instead", "1.7.0") val sonatypeSnapshots = Resolver.sonatypeRepo("snapshots") + val sonatypeOssSnapshots = Resolver.sonatypeOssRepos("snapshots") + val sonatypeStaging = MavenRepository( "sonatype-staging", "https://oss.sonatype.org/service/local/staging/deploy/maven2" diff --git a/main/src/main/scala/sbt/internal/CustomHttp.scala b/main/src/main/scala/sbt/internal/CustomHttp.scala deleted file mode 100644 index bc9a12ae2..000000000 --- a/main/src/main/scala/sbt/internal/CustomHttp.scala +++ /dev/null @@ -1,25 +0,0 @@ -/* - * sbt - * Copyright 2011 - 2018, Lightbend, Inc. - * Copyright 2008 - 2010, Mark Harrah - * Licensed under Apache License 2.0 (see LICENSE) - */ - -package sbt.internal - -import sbt.internal.librarymanagement.{ CustomHttp => LMCustomHttp } -import okhttp3._ - -import sbt.BuildSyntax._ -import sbt.KeyRanks._ - -object CustomHttp { - val okhttpClientBuilder = - settingKey[OkHttpClient.Builder]("Builder for the HTTP client.").withRank(CSetting) - val okhttpClient = - settingKey[OkHttpClient]("HTTP client used for library management.").withRank(CSetting) - - def defaultHttpClientBuilder: OkHttpClient.Builder = { - LMCustomHttp.defaultHttpClientBuilder - } -} diff --git a/main/src/main/scala/sbt/internal/RemoteCache.scala b/main/src/main/scala/sbt/internal/RemoteCache.scala index 200117de7..58e7b4b9c 100644 --- a/main/src/main/scala/sbt/internal/RemoteCache.scala +++ b/main/src/main/scala/sbt/internal/RemoteCache.scala @@ -139,7 +139,7 @@ object RemoteCache { ivySbt := { Credentials.register(credentials.value, streams.value.log) val config0 = ivyConfiguration.value - new IvySbt(config0, sbt.internal.CustomHttp.okhttpClient.value) + new IvySbt(config0) }, ) ) ++ inTask(pullRemoteCache)( diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 535f2e3bb..b84554c9f 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -14,7 +14,7 @@ object Dependencies { // sbt modules private val ioVersion = nightlyVersion.getOrElse("1.6.0") private val lmVersion = - sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.6.1") + sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.7.0-M1") val zincVersion = nightlyVersion.getOrElse("1.7.0-M2") private val sbtIO = "org.scala-sbt" %% "io" % ioVersion