summaryrefslogtreecommitdiff
path: root/scalaplugin
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-11-04 02:52:37 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2017-11-04 02:55:03 -0700
commit486049a994636b8497798f16ad864f895ce11fe1 (patch)
treea2f0ad5a1e7c0b4ec9d3fd3717a1e89cff6462ed /scalaplugin
parent118b10c542157e0a26938e86691ff9faac403ab7 (diff)
downloadmill-486049a994636b8497798f16ad864f895ce11fe1.tar.gz
mill-486049a994636b8497798f16ad864f895ce11fe1.tar.bz2
mill-486049a994636b8497798f16ad864f895ce11fe1.zip
More tweaks to `scalaplugin.Subproject`
Diffstat (limited to 'scalaplugin')
-rw-r--r--scalaplugin/src/main/scala/forge/scalaplugin/Subproject.scala18
1 files changed, 11 insertions, 7 deletions
diff --git a/scalaplugin/src/main/scala/forge/scalaplugin/Subproject.scala b/scalaplugin/src/main/scala/forge/scalaplugin/Subproject.scala
index 7fad28c9..6c66902c 100644
--- a/scalaplugin/src/main/scala/forge/scalaplugin/Subproject.scala
+++ b/scalaplugin/src/main/scala/forge/scalaplugin/Subproject.scala
@@ -95,8 +95,16 @@ object Subproject{
localArtifacts.map(p => PathRef(Path(p)))
}
+ def scalaCompilerIvyDeps(scalaVersion: String, scalaBinaryVersion: String) = Seq(
+ Dependency(Module("org.scala-lang", "scala-compiler"), scalaVersion),
+ Dependency(Module("org.scala-sbt", s"compiler-bridge_$scalaBinaryVersion"), "1.0.3")
+ )
+ def scalaRuntimeIvyDeps(scalaVersion: String) = Seq(
+ Dependency(Module("org.scala-lang", "scala-library"), scalaVersion)
+ )
}
import Subproject._
+
abstract class Subproject {
val scalaVersion: T[String]
@@ -115,18 +123,14 @@ abstract class Subproject {
val compileDepClasspath = T[Seq[PathRef]] {
depClasspath() ++ resolveDependencies(
repositories,
- ivyDeps() ++ compileIvyDeps() ++ Seq(
- Dependency(Module("org.scala-lang", "scala-compiler"), scalaVersion()),
- Dependency(Module("org.scala-sbt", s"compiler-bridge_${scalaBinaryVersion()}"), "1.0.3")
- )
+ ivyDeps() ++ compileIvyDeps() ++ scalaCompilerIvyDeps(scalaVersion(), scalaBinaryVersion())
)
}
+
val runDepClasspath = T[Seq[PathRef]] {
depClasspath() ++ resolveDependencies(
repositories,
- ivyDeps() ++ runIvyDeps() ++ Seq(
- Dependency(Module("org.scala-lang", "scala-library"), scalaVersion())
- )
+ ivyDeps() ++ runIvyDeps() ++ scalaRuntimeIvyDeps(scalaVersion())
)
}