From eba00a0cd9627915d16ff403c923e1ba2952406f Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 25 Jul 2013 15:51:23 +0400 Subject: [PATCH] Log version in JPS plugin CompilerVersion.java is moved to cli-common (shared between compiler and JPS plugin) and renamed to KotlinVersion This is needed because on TeamCity a JPS plugin is configured separately from the compiler, so it may happen that JPS plugin version X tries to run compiler version X+100, and causes trouble. Original commit: 387bf2601b3b3a77becd8919f7850fac35acff13 --- .../src/org/jetbrains/jet/jps/build/KotlinBuilder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java b/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java index 0d88d6e635b..a5477e2ae50 100644 --- a/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java +++ b/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java @@ -20,6 +20,7 @@ import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.cli.common.KotlinVersion; import org.jetbrains.jet.cli.common.messages.CompilerMessageLocation; import org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity; import org.jetbrains.jet.cli.common.messages.MessageCollector; @@ -39,6 +40,7 @@ import java.util.Collection; import java.util.List; import static org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity.EXCEPTION; +import static org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity.INFO; import static org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity.WARNING; public class KotlinBuilder extends ModuleLevelBuilder { @@ -69,9 +71,10 @@ public class KotlinBuilder extends ModuleLevelBuilder { DirtyFilesHolder dirtyFilesHolder, OutputConsumer outputConsumer ) throws ProjectBuildException, IOException { - MessageCollector messageCollector = new MessageCollectorAdapter(context); + messageCollector.report(INFO, "Kotlin JPS plugin version " + KotlinVersion.VERSION, CompilerMessageLocation.NO_LOCATION); + if (chunk.getModules().size() > 1) { // We do not support circular dependencies, but if they are present, we should not break the build, // so we simply yield a warning and report NOTHING_DONE