mirror of https://github.com/sbt/sbt.git
Make explicit where we deviate from ivy behaviour
This commit is contained in:
parent
7bf60557d9
commit
e3a52c3e1f
|
|
@ -265,12 +265,13 @@ private[sbt] object ConvertResolver {
|
||||||
private final val PartEnd = ".part"
|
private final val PartEnd = ".part"
|
||||||
private final val JarEnd = ".jar"
|
private final val JarEnd = ".jar"
|
||||||
private final val TemporaryJar = JarEnd + PartEnd
|
private final val TemporaryJar = JarEnd + PartEnd
|
||||||
|
|
||||||
override def getAndCheck(resource: Resource, target: File): Long = {
|
override def getAndCheck(resource: Resource, target: File): Long = {
|
||||||
val targetPath = target.getAbsolutePath
|
val targetPath = target.getAbsolutePath
|
||||||
if (!managedChecksumsEnabled || !targetPath.endsWith(TemporaryJar)) {
|
if (!managedChecksumsEnabled || !targetPath.endsWith(TemporaryJar)) {
|
||||||
super.getAndCheck(resource, target)
|
super.getAndCheck(resource, target)
|
||||||
} else {
|
} else {
|
||||||
// This is where we differ from ivy behaviour
|
// +ivy deviation
|
||||||
val size = getResource(resource, target)
|
val size = getResource(resource, target)
|
||||||
val checksumAlgorithms = getChecksumAlgorithms
|
val checksumAlgorithms = getChecksumAlgorithms
|
||||||
checksumAlgorithms.foldLeft(false) { (checked, algorithm) =>
|
checksumAlgorithms.foldLeft(false) { (checked, algorithm) =>
|
||||||
|
|
@ -279,6 +280,7 @@ private[sbt] object ConvertResolver {
|
||||||
if (checked) checked
|
if (checked) checked
|
||||||
else downloadChecksum(resource, target, checksumFile, algorithm)
|
else downloadChecksum(resource, target, checksumFile, algorithm)
|
||||||
}
|
}
|
||||||
|
// -ivy deviation
|
||||||
size
|
size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue