diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-11 02:03:49 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-11 02:03:49 -0800 |
commit | c820e54a2c5bab47627f9ddcc05252660f9ce8e7 (patch) | |
tree | 25aee6150fe98fd555d7ee231e6f2f5530b2bff8 /scalalib | |
parent | 2063febc08963321c367a516b3498d16c21b34ee (diff) | |
download | mill-c820e54a2c5bab47627f9ddcc05252660f9ce8e7.tar.gz mill-c820e54a2c5bab47627f9ddcc05252660f9ce8e7.tar.bz2 mill-c820e54a2c5bab47627f9ddcc05252660f9ce8e7.zip |
more tidying up
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaModule.scala | 23 | ||||
-rw-r--r-- | scalalib/src/mill/scalalib/ScalaWorkerApi.scala | 1 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala index 339c6623..b7810246 100644 --- a/scalalib/src/mill/scalalib/ScalaModule.scala +++ b/scalalib/src/mill/scalalib/ScalaModule.scala @@ -33,12 +33,9 @@ trait ScalaModule extends mill.Module with TaskModule { outer => def scalacOptions = T{ Seq.empty[String] } def javacOptions = T{ Seq.empty[String] } - def repositories: Seq[Repository] = Seq( - Cache.ivy2Local, - MavenRepository("https://repo1.maven.org/maven2") - ) - def moduleDeps = Seq.empty[ScalaModule] + + def transitiveModuleDeps: Seq[ScalaModule] = { Seq(this) ++ moduleDeps.flatMap(_.transitiveModuleDeps).distinct } @@ -66,9 +63,15 @@ trait ScalaModule extends mill.Module with TaskModule { outer => ) } + + def repositories: Seq[Repository] = Seq( + Cache.ivy2Local, + MavenRepository("https://repo1.maven.org/maven2") + ) + def platformSuffix = T{ "" } - def compilerBridgeSources = T{ + def scalaCompilerBridgeSources = T{ resolveDependencies( repositories, scalaVersion(), @@ -96,17 +99,16 @@ trait ScalaModule extends mill.Module with TaskModule { outer => def sources = T.sources{ millSourcePath / 'src } def resources = T.sources{ millSourcePath / 'resources } - def generatedSources = T.sources() + def generatedSources = T{ Seq.empty[PathRef] } def allSources = T{ sources() ++ generatedSources() } def compile: T[CompilationResult] = T.persistent{ mill.scalalib.ScalaWorkerApi.scalaWorker().compileScala( scalaVersion(), allSources().map(_.path), - compilerBridgeSources().map(_.path), + scalaCompilerBridgeSources().map(_.path), compileClasspath().map(_.path), scalaCompilerClasspath().map(_.path), - scalacPluginClasspath().map(_.path), scalacOptions(), scalacPluginClasspath().map(_.path), javacOptions(), @@ -137,11 +139,10 @@ trait ScalaModule extends mill.Module with TaskModule { outer => ) } - def localClasspath = T{ resources() ++ Seq(compile().classes) } def jar = T{ createJar( - localClasspath().map(_.path).filter(exists), + (resources() ++ Seq(compile().classes)).map(_.path).filter(exists), mainClass() ) } diff --git a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala index b01409c1..03cd7d9d 100644 --- a/scalalib/src/mill/scalalib/ScalaWorkerApi.scala +++ b/scalalib/src/mill/scalalib/ScalaWorkerApi.scala @@ -51,7 +51,6 @@ trait ScalaWorkerApi { compileBridgeSources: Agg[Path], compileClasspath: Agg[Path], compilerClasspath: Agg[Path], - pluginClasspath: Agg[Path], scalacOptions: Seq[String], scalacPluginClasspath: Agg[Path], javacOptions: Seq[String], |