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: fcf44af294
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user