From 8c25a1982e5e1074d24dfd1c0cd84f7a73d5cd5c Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 6 Apr 2017 18:29:48 +0300 Subject: [PATCH] Change how kotlinc and tools display their version - Display the Kotlin version in kotlin-gradle-plugin. This is needed because if "-version" is specified in compiler arguments, the "info" level of the message printed by the compiler in CLICompiler prevents it from being displayed by default (unless "--debug" is passed to Gradle). - Display the version of JRE the compiler is running on. This will be helpful to diagnose Java 9 related issues in the future. - In CLI, also display the executable name (kotlinc-jvm or kotlinc-js) Original commit: fcf44af294c5b2954a27d0dc4bb4ea96bbb28719 --- .../src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt index 3cbcb30005c..86556d9a2f6 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt @@ -230,10 +230,6 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) { return NOTHING_DONE } - messageCollector.report( - INFO, "Kotlin version " + KotlinCompilerVersion.VERSION + " (JRE " + System.getProperty("java.runtime.version") + ")" - ) - val targetsWithoutOutputDir = targets.filter { it.outputDir == null } if (targetsWithoutOutputDir.isNotEmpty()) { messageCollector.report(ERROR, "Output directory not specified for " + targetsWithoutOutputDir.joinToString()) @@ -251,6 +247,7 @@ class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR) { val commonArguments = compilerArgumentsForChunk(chunk).apply { reportOutputFiles = true + version = true // Always report the version to help diagnosing user issues if they submit the compiler output } val allCompiledFiles = getAllCompiledFilesContainer(context)