diff --git a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/BridgeProviderSpecification.scala b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/BridgeProviderSpecification.scala index 60fdfc7b04..8acad93e9a 100644 --- a/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/BridgeProviderSpecification.scala +++ b/internal/zinc-ivy-integration/src/test/scala/sbt/internal/inc/BridgeProviderSpecification.scala @@ -26,7 +26,21 @@ abstract class BridgeProviderSpecification extends UnitSpec { def currentTarget: File = currentBase / "target" / "ivyhome" def currentManaged: File = currentBase / "target" / "lib_managed" - val resolvers = Array(ZincComponentCompiler.LocalResolver, Resolver.mavenCentral) + private final val ZincScriptedLocal = + s"$${user.dir}/.ivy2/zinc-scripted-local/${Resolver.localBasePattern}" + private final val ScriptedResolver: Resolver = { + import sbt.librarymanagement.{ FileRepository, Patterns } + val toUse = Vector(ZincScriptedLocal) + val ivyPattern = Patterns().withIsMavenCompatible(false) + val finalPatterns = ivyPattern + .withIvyPatterns(toUse) + .withArtifactPatterns(toUse) + .withSkipConsistencyCheck(true) + FileRepository("zinc-scripted-local", Resolver.defaultFileConfiguration, finalPatterns) + } + + // Use the scripted resolver to make sure that we don't mistakenly get user local jars + val resolvers = Array(ScriptedResolver, Resolver.mavenCentral) private def ivyConfiguration = getDefaultConfiguration(currentBase, currentTarget, resolvers, log) diff --git a/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala b/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala index 6deb42cc91..4ae4df8d7d 100644 --- a/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala +++ b/internal/zinc-scripted/src/test/scala/sbt/internal/inc/IncHandler.scala @@ -64,22 +64,6 @@ final class IncHandler(directory: File, cacheDir: File, scriptedLog: ManagedLogg type State = Option[IncInstance] type IncCommand = (ProjectStructure, List[String], IncInstance) => Unit - private final val ZincScriptedLocal = - s"$${user.dir}/.ivy2/zinc-scripted-local/${Resolver.localBasePattern}" - private final val ScriptedResolver: Resolver = { - import sbt.librarymanagement.{ FileRepository, Patterns } - val toUse = Vector(ZincScriptedLocal) - val ivyPattern = Patterns().withIsMavenCompatible(false) - val finalPatterns = ivyPattern - .withIvyPatterns(toUse) - .withArtifactPatterns(toUse) - .withSkipConsistencyCheck(true) - FileRepository("zinc-scripted-local", Resolver.defaultFileConfiguration, finalPatterns) - } - - // Use the scripted resolver to make sure that we don't mistakenly get other jars - override val resolvers: Array[Resolver] = Array(ScriptedResolver, Resolver.mavenCentral) - val compiler = new IncrementalCompilerImpl def initialState: Option[IncInstance] = {