mirror of https://github.com/sbt/sbt.git
bump to lm 1.3.0-M3
This also adds `CustomHttp.okhttpClient` and `CustomHttp.okhttpClientBuilder` settings to experimentally customize HTTP client.
This commit is contained in:
parent
b40084f6fd
commit
8790a7b45d
|
|
@ -30,7 +30,7 @@ import sbt.internal._
|
|||
import sbt.internal.inc.JavaInterfaceUtil._
|
||||
import sbt.internal.inc.ZincUtil
|
||||
import sbt.internal.io.{ Source, WatchState }
|
||||
import sbt.internal.librarymanagement._
|
||||
import sbt.internal.librarymanagement.{ CustomHttp => _, _ }
|
||||
import sbt.internal.librarymanagement.mavenint.{
|
||||
PomExtraDependencyAttributes,
|
||||
SbtPomExtraProperties
|
||||
|
|
@ -217,6 +217,8 @@ 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,
|
||||
|
|
@ -2180,8 +2182,11 @@ object Classpaths {
|
|||
)
|
||||
else None
|
||||
},
|
||||
dependencyResolution := IvyDependencyResolution(ivyConfiguration.value),
|
||||
publisher := IvyPublisher(ivyConfiguration.value),
|
||||
dependencyResolution := IvyDependencyResolution(
|
||||
ivyConfiguration.value,
|
||||
CustomHttp.okhttpClient.value
|
||||
),
|
||||
publisher := IvyPublisher(ivyConfiguration.value, CustomHttp.okhttpClient.value),
|
||||
ivyConfiguration := mkIvyConfiguration.value,
|
||||
ivyConfigurations := {
|
||||
val confs = thisProject.value.configurations
|
||||
|
|
@ -2428,7 +2433,7 @@ object Classpaths {
|
|||
private[sbt] def ivySbt0: Initialize[Task[IvySbt]] =
|
||||
Def.task {
|
||||
Credentials.register(credentials.value, streams.value.log)
|
||||
new IvySbt(ivyConfiguration.value)
|
||||
new IvySbt(ivyConfiguration.value, CustomHttp.okhttpClient.value)
|
||||
}
|
||||
def moduleSettings0: Initialize[Task[ModuleSettings]] = Def.task {
|
||||
ModuleDescriptorConfiguration(projectID.value, projectInfo.value)
|
||||
|
|
@ -2499,7 +2504,10 @@ object Classpaths {
|
|||
).withScalaOrganization(scalaOrganization.value)
|
||||
)
|
||||
},
|
||||
dependencyResolution := IvyDependencyResolution(ivyConfiguration.value),
|
||||
dependencyResolution := IvyDependencyResolution(
|
||||
ivyConfiguration.value,
|
||||
CustomHttp.okhttpClient.value
|
||||
),
|
||||
updateSbtClassifiers in TaskGlobal := (Def.task {
|
||||
val lm = dependencyResolution.value
|
||||
val s = streams.value
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ object Dependencies {
|
|||
private val lmVersion =
|
||||
sys.props.get("sbt.build.lm.version") match {
|
||||
case Some(version) => version
|
||||
case _ => "1.3.0-M2"
|
||||
case _ => "1.3.0-M3"
|
||||
}
|
||||
private val zincVersion = "1.3.0-M3"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue