Skip to content

Commit

Permalink
Split kotlin and java compilation messages with count
Browse files Browse the repository at this point in the history
  • Loading branch information
lefou committed Oct 23, 2023
1 parent ba13857 commit e150c61
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main/src/de/tobiasroeser/mill/kotlin/KotlinModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,13 @@ trait KotlinModule extends JavaModule with KotlinModulePlatform { outer =>
val isJava = javaSourceFiles.nonEmpty
val isMixed = isKotlin && isJava

val counts = Seq("Kotlin" -> kotlinSourceFiles.size, "Java" -> javaSourceFiles.size)
ctx.log.info(
s"Compiling ${counts.filter(_._2 > 0).map { case (n, c) => s"$c $n" }.mkString(" and ")} sources to ${classes} ..."
)

val compileCp = compileClasspath().map(_.path).filter(os.exists)
val updateCompileOutput = upstreamCompileOutput()

def compileJava: Result[CompilationResult] = {
ctx.log.info(
s"Compiling ${javaSourceFiles.size} sources to ${classes} ..."
)
// The compile step is lazy, but it's dependencies are not!
internalCompileJavaFiles(
worker = zincWorkerRef().worker(),
Expand All @@ -164,6 +162,9 @@ trait KotlinModule extends JavaModule with KotlinModulePlatform { outer =>
}

if (isMixed || isKotlin) {
ctx.log.info(
s"Compiling ${kotlinSourceFiles.size} sources to ${classes} ..."
)
val compilerArgs: Seq[String] = Seq(
// destdir
Seq("-d", classes.toIO.getAbsolutePath()),
Expand Down

0 comments on commit e150c61

Please sign in to comment.