@@ -445,13 +445,9 @@ object Jvm {
445445
446446 private def coursierCache (
447447 ctx : Option [mill.define.TaskCtx ],
448- coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]],
449- config : CoursierConfig
448+ coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]]
450449 ) =
451- FileCache [Task ](os.Path (config.cacheLocation).toIO)
452- .withCredentials(config.credentials)
453- .withTtl(config.ttl)
454- .withCachePolicies(config.cachePolicies)
450+ FileCache [Task ]()
455451 .pipe { cache =>
456452 coursierCacheCustomizer.fold(cache)(c => c.apply(cache))
457453 }
@@ -477,8 +473,7 @@ object Jvm {
477473 coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
478474 artifactTypes : Option [Set [Type ]] = None ,
479475 resolutionParams : ResolutionParams = ResolutionParams (),
480- checkGradleModules : Boolean = false ,
481- config : CoursierConfig
476+ checkGradleModules : Boolean = false
482477 ): Result [coursier.Artifacts .Result ] = {
483478 val resolutionRes = resolveDependenciesMetadataSafe(
484479 repositories,
@@ -489,12 +484,11 @@ object Jvm {
489484 ctx,
490485 coursierCacheCustomizer,
491486 resolutionParams,
492- checkGradleModules = checkGradleModules,
493- config = config
487+ checkGradleModules = checkGradleModules
494488 )
495489
496490 resolutionRes.flatMap { resolution =>
497- val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer, config )
491+ val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer)
498492
499493 val artifactsResultOrError = Artifacts (coursierCache0)
500494 .withResolution(resolution)
@@ -542,8 +536,7 @@ object Jvm {
542536 coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
543537 artifactTypes : Option [Set [Type ]] = None ,
544538 resolutionParams : ResolutionParams = ResolutionParams (),
545- checkGradleModules : Boolean = false ,
546- config : CoursierConfig
539+ checkGradleModules : Boolean = false
547540 ): Result [Seq [PathRef ]] =
548541 getArtifacts(
549542 repositories,
@@ -556,8 +549,7 @@ object Jvm {
556549 coursierCacheCustomizer,
557550 artifactTypes,
558551 resolutionParams,
559- checkGradleModules = checkGradleModules,
560- config = config
552+ checkGradleModules = checkGradleModules
561553 ).map { res =>
562554 BuildCtx .withFilesystemCheckerDisabled {
563555 res.files
@@ -568,24 +560,22 @@ object Jvm {
568560
569561 def jvmIndex (
570562 ctx : Option [mill.define.TaskCtx ] = None ,
571- coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
572- config : CoursierConfig
563+ coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None
573564 ): JvmIndex = {
574- val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer, config )
575- coursierCache0.logger.use(jvmIndex0(ctx, coursierCacheCustomizer, config = config ))
565+ val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer)
566+ coursierCache0.logger.use(jvmIndex0(ctx, coursierCacheCustomizer))
576567 .unsafeRun()(using coursierCache0.ec)
577568 }
578569
579570 def jvmIndex0 (
580571 ctx : Option [mill.define.TaskCtx ] = None ,
581572 coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
582- jvmIndexVersion : String = " latest.release" ,
583- config : CoursierConfig
573+ jvmIndexVersion : String = " latest.release"
584574 ): Task [JvmIndex ] = {
585- val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer, config )
575+ val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer)
586576 JvmIndex .load(
587577 cache = coursierCache0, // the coursier.cache.Cache instance to use
588- repositories = config .repositories, // repositories to use
578+ repositories = Resolve () .repositories, // repositories to use
589579 indexChannel = JvmChannel .module(
590580 JvmChannel .centralModule(),
591581 version = jvmIndexVersion
@@ -603,10 +593,9 @@ object Jvm {
603593 ctx : Option [mill.define.TaskCtx ] = None ,
604594 coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
605595 jvmIndexVersion : String = mill.api.BuildInfo .coursierJvmIndexVersion,
606- useShortPaths : Boolean = false ,
607- config : CoursierConfig
596+ useShortPaths : Boolean = false
608597 ): Result [os.Path ] = {
609- val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer, config )
598+ val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer)
610599 val shortPathDirOpt = Option .when(useShortPaths) {
611600 if (isWin)
612601 // On Windows, prefer to use System.getenv over sys.env (or ctx.env for
@@ -625,16 +614,10 @@ object Jvm {
625614 val jvmCache = JvmCache ()
626615 .withArchiveCache(
627616 ArchiveCache ()
628- .withLocation(os.Path (config.archiveCacheLocation).toIO)
629617 .withCache(coursierCache0)
630618 .withShortPathDirectory(shortPathDirOpt.map(_.toIO))
631619 )
632- .withIndex(jvmIndex0(
633- ctx,
634- coursierCacheCustomizer,
635- jvmIndexVersion,
636- config = config
637- ))
620+ .withIndex(jvmIndex0(ctx, coursierCacheCustomizer, jvmIndexVersion))
638621 val javaHome = JavaHome ()
639622 .withCache(jvmCache)
640623 // when given a version like "17", always pick highest version in the index
@@ -656,8 +639,7 @@ object Jvm {
656639 coursierCacheCustomizer : Option [FileCache [Task ] => FileCache [Task ]] = None ,
657640 resolutionParams : ResolutionParams = ResolutionParams (),
658641 boms : IterableOnce [BomDependency ] = Nil ,
659- checkGradleModules : Boolean = false ,
660- config : CoursierConfig
642+ checkGradleModules : Boolean = false
661643 ): Result [Resolution ] = {
662644
663645 val rootDeps = deps.iterator
@@ -670,7 +652,7 @@ object Jvm {
670652 .toMap
671653
672654 val offlineMode = ctx.fold(false )(_.offline)
673- val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer, config )
655+ val coursierCache0 = coursierCache(ctx, coursierCacheCustomizer)
674656
675657 val resolutionParams0 = resolutionParams.addForceVersion(forceVersions.toSeq* )
676658
@@ -691,8 +673,6 @@ object Jvm {
691673 .withResolutionParams(resolutionParams0)
692674 .withMapDependenciesOpt(mapDependencies)
693675 .withBoms(boms.iterator.toSeq)
694- .withConfFiles(config.confFiles.map(_.toNIO))
695- .withMirrors(config.mirrors)
696676
697677 resolve.either() match {
698678 case Left (error) =>
@@ -743,11 +723,8 @@ object Jvm {
743723 }
744724
745725 // Parse a list of repositories from their string representation
746- private [mill] def reposFromStrings (
747- repoList : Seq [String ],
748- defaultRepos : Seq [Repository ]
749- ): Result [Seq [Repository ]] = {
750- RepositoryParser .repositories(repoList, defaultRepos).either match {
726+ private [mill] def reposFromStrings (repoList : Seq [String ]): Result [Seq [Repository ]] = {
727+ RepositoryParser .repositories(repoList).either match {
751728 case Left (errs) =>
752729 val msg =
753730 s " Invalid repository string: " + System .lineSeparator() +
0 commit comments