diff options
author | Nikolay Tatarinov <5min4eq.unity@gmail.com> | 2017-12-25 05:31:40 +0300 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-12-24 18:31:40 -0800 |
commit | 048fe23d116793039e7d245edd4afdcc3bdd3cc2 (patch) | |
tree | c688d23775e3828e1645e1fc42df5b701070a832 /scalaplugin/src | |
parent | a0d16d40156f639090235f67117fe11ce0dbb5e9 (diff) | |
download | mill-048fe23d116793039e7d245edd4afdcc3bdd3cc2.tar.gz mill-048fe23d116793039e7d245edd4afdcc3bdd3cc2.tar.bz2 mill-048fe23d116793039e7d245edd4afdcc3bdd3cc2.zip |
prepare mill-bridges to be published to maven central (#78)
Diffstat (limited to 'scalaplugin/src')
-rw-r--r-- | scalaplugin/src/main/scala/mill/scalaplugin/Lib.scala | 2 | ||||
-rw-r--r-- | scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/scalaplugin/src/main/scala/mill/scalaplugin/Lib.scala b/scalaplugin/src/main/scala/mill/scalaplugin/Lib.scala index c89254b0..b314454c 100644 --- a/scalaplugin/src/main/scala/mill/scalaplugin/Lib.scala +++ b/scalaplugin/src/main/scala/mill/scalaplugin/Lib.scala @@ -204,7 +204,7 @@ object Lib{ Dep.Java("org.scala-lang", "scala-library", scalaVersion) ) def compilerBridgeIvyDep(scalaVersion: String) = - Dep.Point(coursier.Dependency(coursier.Module("com.lihaoyi", "mill-bridge"), "0.1-SNAPSHOT", transitive = false)) + Dep.Point(coursier.Dependency(coursier.Module("com.lihaoyi", "mill-bridge"), "0.1", transitive = false)) val DefaultShellScript: Seq[String] = Seq( "#!/usr/bin/env sh", diff --git a/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala b/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala index 949682ca..49720863 100644 --- a/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala +++ b/scalaplugin/src/main/scala/mill/scalaplugin/ScalaModule.scala @@ -143,10 +143,13 @@ trait ScalaModule extends Module with TaskModule { outer => Seq(dep) ) classpath match { - case Result.Success(Seq(single)) => PathRef(single.path, quick = true) - case Result.Success(Seq()) => throw new Exception(dep + " resolution failed") - case f: Result.Failure => throw new Exception(dep + s" resolution failed.\n + ${f.msg}") - case _ => throw new Exception(dep + " resolution resulted in more than one file") + case Result.Success(resolved) => + resolved.filterNot(_.path.ext == "pom") match { + case Seq(single) => PathRef(single.path, quick = true) + case Seq() => throw new Exception(dep + " resolution failed") // TODO: find out, is it possible? + case _ => throw new Exception(dep + " resolution resulted in more than one file") + } + case f: Result.Failure => throw new Exception(dep + s" resolution failed.\n + ${f.msg}") // TODO: remove, resolveDependencies will take care of this. } } } |