mirror of https://github.com/sbt/sbt.git
Add `managedChecksums` to `UpdateOptions`
This commit is contained in:
parent
892f6e3775
commit
4c8036c7cb
|
|
@ -26,17 +26,19 @@ trait UpdateOptionsFormat { self: BasicJsonProtocol with ModuleIDFormats with Re
|
|||
uo.latestSnapshots,
|
||||
uo.consolidatedResolution,
|
||||
uo.cachedResolution,
|
||||
uo.managedChecksums,
|
||||
uo.moduleResolvers
|
||||
),
|
||||
(xs: (String, Boolean, Boolean, Boolean, Boolean, Map[ModuleID, Resolver])) =>
|
||||
(xs: (String, Boolean, Boolean, Boolean, Boolean, Boolean, Map[ModuleID, Resolver])) =>
|
||||
new UpdateOptions(
|
||||
levels(xs._1),
|
||||
xs._2,
|
||||
xs._3,
|
||||
xs._4,
|
||||
xs._5,
|
||||
xs._6,
|
||||
PartialFunction.empty,
|
||||
xs._6
|
||||
xs._7
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ final class UpdateOptions private[sbt] (
|
|||
val consolidatedResolution: Boolean,
|
||||
// If set to true, use cached resolution.
|
||||
val cachedResolution: Boolean,
|
||||
// If set to true, use cached resolution.
|
||||
val managedChecksums: Boolean,
|
||||
// Extension point for an alternative resolver converter.
|
||||
val resolverConverter: UpdateOptions.ResolverConverter,
|
||||
// Map the unique resolver to be checked for the module ID
|
||||
|
|
@ -54,12 +56,16 @@ final class UpdateOptions private[sbt] (
|
|||
def withModuleResolvers(moduleResolvers: Map[ModuleID, Resolver]): UpdateOptions =
|
||||
copy(moduleResolvers = moduleResolvers)
|
||||
|
||||
def withManagedChecksums(managedChecksums: Boolean): UpdateOptions =
|
||||
copy(managedChecksums = managedChecksums)
|
||||
|
||||
private[sbt] def copy(
|
||||
circularDependencyLevel: CircularDependencyLevel = this.circularDependencyLevel,
|
||||
interProjectFirst: Boolean = this.interProjectFirst,
|
||||
latestSnapshots: Boolean = this.latestSnapshots,
|
||||
consolidatedResolution: Boolean = this.consolidatedResolution,
|
||||
cachedResolution: Boolean = this.cachedResolution,
|
||||
managedChecksums: Boolean = this.managedChecksums,
|
||||
resolverConverter: UpdateOptions.ResolverConverter = this.resolverConverter,
|
||||
moduleResolvers: Map[ModuleID, Resolver] = this.moduleResolvers
|
||||
): UpdateOptions =
|
||||
|
|
@ -69,6 +75,7 @@ final class UpdateOptions private[sbt] (
|
|||
latestSnapshots,
|
||||
consolidatedResolution,
|
||||
cachedResolution,
|
||||
managedChecksums,
|
||||
resolverConverter,
|
||||
moduleResolvers
|
||||
)
|
||||
|
|
@ -79,6 +86,7 @@ final class UpdateOptions private[sbt] (
|
|||
this.interProjectFirst == o.interProjectFirst &&
|
||||
this.latestSnapshots == o.latestSnapshots &&
|
||||
this.cachedResolution == o.cachedResolution &&
|
||||
this.managedChecksums == o.managedChecksums &&
|
||||
this.resolverConverter == o.resolverConverter &&
|
||||
this.moduleResolvers == o.moduleResolvers
|
||||
case _ => false
|
||||
|
|
@ -90,6 +98,7 @@ final class UpdateOptions private[sbt] (
|
|||
hash = hash * 31 + this.interProjectFirst.##
|
||||
hash = hash * 31 + this.latestSnapshots.##
|
||||
hash = hash * 31 + this.cachedResolution.##
|
||||
hash = hash * 31 + this.managedChecksums.##
|
||||
hash = hash * 31 + this.resolverConverter.##
|
||||
hash = hash * 31 + this.moduleResolvers.##
|
||||
hash
|
||||
|
|
@ -106,6 +115,7 @@ object UpdateOptions {
|
|||
latestSnapshots = true,
|
||||
consolidatedResolution = false,
|
||||
cachedResolution = false,
|
||||
managedChecksums = false,
|
||||
resolverConverter = PartialFunction.empty,
|
||||
moduleResolvers = Map.empty
|
||||
)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ trait BaseIvySpecification extends UnitSpec {
|
|||
def mkIvyConfiguration(uo: UpdateOptions): IvyConfiguration = {
|
||||
val paths = IvyPaths(currentBase, Some(currentTarget))
|
||||
val other = Vector.empty
|
||||
val check = Vector.empty
|
||||
val check = IvySbt.DefaultChecksums.headOption.toVector
|
||||
val moduleConfs = Vector(ModuleConfiguration("*", chainResolver))
|
||||
val resCacheDir = currentTarget / "resolution-cache"
|
||||
new InlineIvyConfiguration(paths,
|
||||
|
|
|
|||
Loading…
Reference in New Issue