Improve messages printed by JPS plugin in Messages view

- Don't print "Loaded plugin: KotlinAndroidJpsPlugin" and "Using
  kotlin-home = ..." for every build. They are rarely useful; they can
  be found in the build log now
- Instead of potentially confusing for the user "Kotlin JPS plugin
  version ..." output simply "Kotlin version ...". Also add the version
  of the JRE, where the compiler is being run
- Do not treat messages reported with severity LOGGING as BuildMessage
  with kind PROGRESS. Such build messages are displayed to the user in
  the progress/status bar when IDEA Make process is running, but LOGGING
  messages never had this meaning. In particular, users could be
  confused by the progress bar message "Kotlin: Configuring the
  compilation environment" visible for a very long time during
  compilation. This message just happens to be the last LOGGING message
  reported by the compiler before the actual compilation; its presence
  there created an illusion that Kotlin spends most of the time
  configuring the compilation environment

 #KT-17387 Fixed
This commit is contained in:
Alexander Udalov
2017-04-06 19:40:50 +03:00
parent d8d3bafbe9
commit bb01ca038a
3 changed files with 30 additions and 22 deletions
@@ -732,13 +732,15 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
assertFilesExistInOutput(module, "foo/Bar.class")
val buildResult = BuildResult()
val canceledStatus = object: CanceledStatus {
val canceledStatus = object : CanceledStatus {
var checkFromIndex = 0
override fun isCanceled(): Boolean {
val messages = buildResult.getMessages(BuildMessage.Kind.INFO)
for (i in checkFromIndex..messages.size - 1) {
if (messages.get(i).messageText.startsWith("Kotlin JPS plugin version")) return true
if (messages[i].messageText.matches("kotlinc-jvm .+ \\(JRE .+\\)".toRegex())) {
return true
}
}
checkFromIndex = messages.size
@@ -749,8 +751,6 @@ class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
touch("src/Bar.kt").apply()
buildCustom(canceledStatus, TestProjectBuilderLogger(), buildResult)
assertCanceled(buildResult)
assertFilesNotExistInOutput(module, "foo/Bar.class")
}
fun testFileDoesNotExistWarning() {