diff options
author | Alexandra Dima <alexandra.dima@jetbrains.com> | 2019-07-10 17:12:12 +0200 |
---|---|---|
committer | Samvel Abrahamyan <samvel1024@gmail.com> | 2019-10-12 14:32:58 +0200 |
commit | 0d53a6e057ae24ecf0bfd5bf0929310723c31282 (patch) | |
tree | 1503d4f04ff8c4bfb54f3ae841293ae20076eb8b /scalalib/src/JavaModule.scala | |
parent | b71748b1b58da3b70ceb9290257ed688b71fbe21 (diff) | |
download | mill-0d53a6e057ae24ecf0bfd5bf0929310723c31282.tar.gz mill-0d53a6e057ae24ecf0bfd5bf0929310723c31282.tar.bz2 mill-0d53a6e057ae24ecf0bfd5bf0929310723c31282.zip |
Implemented support for publishing compilation diagnostics through the custom BspLoggedReporter reporter. Patched the mill.api.Ctx data structure as well as the evaluate() method on mill's Evaluator in order to accept a potential reporter from the outside, or use a default value if none is given.
Diffstat (limited to 'scalalib/src/JavaModule.scala')
-rw-r--r-- | scalalib/src/JavaModule.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scalalib/src/JavaModule.scala b/scalalib/src/JavaModule.scala index b9987ca1..e6c47324 100644 --- a/scalalib/src/JavaModule.scala +++ b/scalalib/src/JavaModule.scala @@ -13,6 +13,9 @@ import mill.modules.Jvm.{createAssembly, createJar} import Lib._ import mill.scalalib.publish.{Artifact, Scope} import mill.api.Loose.Agg +import sbt.internal.inc.ManagedLoggedReporter +import sbt.internal.util.{ConsoleOut, MainAppender} +import sbt.util.LogExchange /** * Core configuration required to compile a single Scala compilation target @@ -209,15 +212,17 @@ trait JavaModule extends mill.Module with TaskModule with GenIdeaModule { outer } yield PathRef(path) } + /** * Compiles the current module to generate compiled classfiles/bytecode */ - def compile: T[mill.scalalib.api.CompilationResult] = T.persistent{ + def compile: T[mill.scalalib.api.CompilationResult] = T.persistent { zincWorker.worker().compileJava( upstreamCompileOutput(), allSourceFiles().map(_.path), compileClasspath().map(_.path), - javacOptions() + javacOptions(), + T.ctx().reporter ) } |