summaryrefslogtreecommitdiff
path: root/scalalib/src/ScalaModule.scala
diff options
context:
space:
mode:
authorOlivier Mélois <baccata64@gmail.com>2019-07-08 10:33:31 +0200
committerTobias Roeser <le.petit.fou@web.de>2019-07-08 10:33:31 +0200
commitfe8667d58aef03e8b97c1361495ab5d851deee60 (patch)
treea652df66b0d873f0635b2f6a55122195e9412a3a /scalalib/src/ScalaModule.scala
parent83aa7de17bf175ce64869f70c54de3882e047a1f (diff)
downloadmill-fe8667d58aef03e8b97c1361495ab5d851deee60.tar.gz
mill-fe8667d58aef03e8b97c1361495ab5d851deee60.tar.bz2
mill-fe8667d58aef03e8b97c1361495ab5d851deee60.zip
Interpolates $MILL_VERSION in ivy imports (#649)
* Interpolates $MILL_VERSION in ivy imports This overrides the default $ivy magic import by replacing the `$MILL_VERSION` string with mill's version, in order to facilitate the loading/update of contrib modules. Ammonite had to be bumped to 1.6.9 * Removed bloop import * AmmoniteExit import fix * Removed repl dep check * Removed problematic check * Made ammonite version override-able
Diffstat (limited to 'scalalib/src/ScalaModule.scala')
-rw-r--r--scalalib/src/ScalaModule.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/scalalib/src/ScalaModule.scala b/scalalib/src/ScalaModule.scala
index f45a7e98..0ebd5700 100644
--- a/scalalib/src/ScalaModule.scala
+++ b/scalalib/src/ScalaModule.scala
@@ -197,6 +197,12 @@ trait ScalaModule extends JavaModule { outer =>
}
/**
+ * Ammonite's version used in the `repl` command is by default
+ * set to the one Mill is built against.
+ */
+ def ammoniteVersion = T(Versions.ammonite)
+
+ /**
* Dependencies that are necessary to run the Ammonite Scala REPL
*/
def ammoniteReplClasspath = T{
@@ -205,7 +211,7 @@ trait ScalaModule extends JavaModule { outer =>
unmanagedClasspath() ++
resolveDeps(T.task{
runIvyDeps() ++ scalaLibraryIvyDeps() ++ transitiveIvyDeps() ++
- Agg(ivy"com.lihaoyi:::ammonite:${Versions.ammonite}")
+ Agg(ivy"com.lihaoyi:::ammonite:${ammoniteVersion()}")
})()
}