diff --git a/.idea/misc.xml b/.idea/misc.xml
index c7404941a41..202f4e6f5f7 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -54,7 +54,7 @@
http://www.w3.org/1999/xhtml
-
+
diff --git a/compiler/compiler.pro b/compiler/compiler.pro
index 1f11a834d47..eb98a2cffd3 100644
--- a/compiler/compiler.pro
+++ b/compiler/compiler.pro
@@ -93,7 +93,6 @@ messages/**)
# for gradle plugin and other server tools
-keep class com.intellij.openapi.util.io.ZipFileCache { public *; }
-#-keep class com.intellij.openapi.util.LowMemoryWatcher { public *; }
# for j2k
-keep class com.intellij.codeInsight.NullableNotNullManager { public protected *; }
diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/FinishBuildListener.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/FinishBuildListener.kt
index 671bd6557d7..55591175725 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/FinishBuildListener.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/FinishBuildListener.kt
@@ -39,8 +39,7 @@ private fun comparableVersionStr(version: String) =
?.drop(1)?.take(2)
// checking if two subexpression groups are found and length of each is >0 and <4
?.let { if (it.all { (it?.value?.length() ?: 0).let { it > 0 && it < 4 }}) it else null }
- ?.map { "%3s".format(it?.value ?: 0).replace(' ', '0') }
- ?.joinToString(".")
+ ?.joinToString(".", transform = { it!!.value.padStart(3, '0') })
class FinishBuildListener(pluginClassLoader: ClassLoader?, val startMemory: Long) : BuildAdapter() {
@@ -80,7 +79,7 @@ class FinishBuildListener(pluginClassLoader: ClassLoader?, val startMemory: Long
// the value reported here is not necessarily a leak, since it is calculated before collecting the plugin classes
// but on subsequent runs in the daemon it should be rather small, then the classes are actually reused by the daemon (see above)
- getUsedMemoryKb().let { log.kotlinDebug("[PERF] Used memory after build: $it kb (${"%+d".format(it-startMemory)} kb)") }
+ getUsedMemoryKb().let { log.kotlinDebug("[PERF] Used memory after build: $it kb (${"%+d".format(it - startMemory)} kb)") }
}
}
@@ -93,11 +92,8 @@ class CompilerServicesCleanup(private var pluginClassLoader: ClassLoader?) {
log.kotlinDebug("compiler services cleanup")
- // \todo remove ZipFileCache cleanup after switching to recent idea libs
+ // TODO: remove ZipFileCache cleanup after switching to recent idea libs
stopZipFileCache()
- // currently unused since LowMemoryWatcher usages are (hopefully) all removed
- // \todo doublecheck and remove LowMemoryWatcher cleanup code
- //stopLowMemoryWatcher()
stopJobScheduler()
pluginClassLoader = null
@@ -108,11 +104,6 @@ class CompilerServicesCleanup(private var pluginClassLoader: ClassLoader?) {
log.kotlinDebug("ZipFileCache finished successfully")
}
- private fun stopLowMemoryWatcher() {
- callVoidStaticMethod("com.intellij.openapi.util.LowMemoryWatcher", "stopAll")
- log.kotlinDebug("LowMemoryWatcher finished successfully")
- }
-
private fun stopJobScheduler() {
log.kotlinDebug("Stop JobScheduler")
diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginWrapper.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginWrapper.kt
index 064143e0ac7..53b370181bb 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginWrapper.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginWrapper.kt
@@ -15,7 +15,7 @@ import java.lang.reflect.Method
import org.jetbrains.kotlin.gradle.tasks.KotlinTasksProvider
import java.net.URLClassLoader
-// \todo simplify: the complicated structure is a leftover from dynamic loading of plugin core, could be significantly simplified now
+// TODO: simplify: the complicated structure is a leftover from dynamic loading of plugin core, could be significantly simplified now
abstract class KotlinBasePluginWrapper: Plugin {