launcher 1.1.4

Forward `m.allowInsecureProtocol` to `MavenRepository`.
This commit is contained in:
Eugene Yokota 2020-05-28 00:59:10 -04:00
parent 1f3ac6c8cd
commit 4bb4c3a9b6
3 changed files with 10 additions and 3 deletions

View File

@ -3778,7 +3778,8 @@ object Classpaths {
private[this] def bootRepository(repo: xsbti.Repository): Resolver = {
import xsbti.Predefined
repo match {
case m: xsbti.MavenRepository => MavenRepository(m.id, m.url.toString)
case m: xsbti.MavenRepository =>
MavenRepository(m.id, m.url.toString).withAllowInsecureProtocol(m.allowInsecureProtocol)
case i: xsbti.IvyRepository =>
val patterns = Patterns(
Vector(i.ivyPattern),
@ -3792,7 +3793,8 @@ object Classpaths {
// This hackery is to deal suitably with UNC paths on Windows. Once we can assume Java7, Paths should save us from this.
val file = IO.toFile(i.url)
Resolver.file(i.id, file)(patterns)
case _ => Resolver.url(i.id, i.url)(patterns)
case _ =>
Resolver.url(i.id, i.url)(patterns).withAllowInsecureProtocol(i.allowInsecureProtocol)
}
case p: xsbti.PredefinedRepository =>
p.id match {

View File

@ -21,7 +21,7 @@ object Dependencies {
private val libraryManagementCore = "org.scala-sbt" %% "librarymanagement-core" % lmVersion
private val libraryManagementIvy = "org.scala-sbt" %% "librarymanagement-ivy" % lmVersion
val launcherVersion = "1.1.3"
val launcherVersion = "1.1.4"
val launcherInterface = "org.scala-sbt" % "launcher-interface" % launcherVersion
val rawLauncher = "org.scala-sbt" % "launcher" % launcherVersion
val testInterface = "org.scala-sbt" % "test-interface" % "1.0"

View File

@ -560,6 +560,11 @@ public class ScriptedLauncher {
return id;
}
@Override
public boolean allowInsecureProtocol() {
return false;
}
@Override
public URL url() {
try {