diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2019-05-19 15:15:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 15:15:24 +0800 |
commit | 68505aad4a22686594965bc910e60c8d2b6a95d4 (patch) | |
tree | 4c2099e21593a840c7119901becc0cbb8682956f /contrib/bloop | |
parent | 7d706641f6f9caa0509903f691d16d78402b4623 (diff) | |
download | mill-68505aad4a22686594965bc910e60c8d2b6a95d4.tar.gz mill-68505aad4a22686594965bc910e60c8d2b6a95d4.tar.bz2 mill-68505aad4a22686594965bc910e60c8d2b6a95d4.zip |
Bump ammonite to 1.6.7 (#610)
* bump ammonite to 1.6.7
* upgrade all the things
* add scalaj-http shims for bootstrapping
* wip
* tweak-error-message
* tweak coursier
* .
Diffstat (limited to 'contrib/bloop')
-rw-r--r-- | contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala b/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala index e99b25d5..03af2465 100644 --- a/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala +++ b/contrib/bloop/src/mill.contrib.bloop/BloopImpl.scala @@ -238,19 +238,22 @@ class BloopImpl(ev: () => Evaluator, wd: Path) extends ExternalModule { outer => import coursier.util._ def source(r: Resolution) = Resolution( - r.dependencies.map(d => - d.copy(attributes = d.attributes.copy(classifier = "sources"))) + r.dependencies + .map(d => + d.copy(attributes = d.attributes.copy(classifier = coursier.Classifier("sources"))) + ) + .toSeq ) import scala.concurrent.ExecutionContext.Implicits.global - val unresolved = Resolution(deps.toSet) - val fetch = Fetch.from(repos, Cache.fetch[Task]()) + val unresolved = Resolution(deps) + val fetch = ResolutionProcess.fetch(repos, coursier.cache.Cache.default.fetch) val gatherTask = for { resolved <- unresolved.process.run(fetch) resolvedSources <- source(resolved).process.run(fetch) all = resolved.dependencyArtifacts ++ resolvedSources.dependencyArtifacts gathered <- Gather[Task].gather(all.distinct.map { - case (dep, art) => Cache.file[Task](art).run.map(dep -> _) + case (dep, art) => coursier.cache.Cache.default.file(art).run.map(dep -> _) }) } yield gathered @@ -268,14 +271,14 @@ class BloopImpl(ev: () => Evaluator, wd: Path) extends ExternalModule { outer => .mapValues { _.map { case (_, mod, _, classifier, file) => - BloopConfig.Artifact(mod, classifier, None, file.toPath) + BloopConfig.Artifact(mod.value, classifier.map(_.value), None, file.toPath) }.toList } .map { case ((org, mod, version), artifacts) => BloopConfig.Module( - organization = org, - name = mod, + organization = org.value, + name = mod.value, version = version, configurations = None, artifacts = artifacts |