Fixing minor issues after review
(cherry picked from commit 928769e)
This commit is contained in:
Generated
+1
-1
@@ -54,7 +54,7 @@
|
||||
<component name="ProjectResources">
|
||||
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="WebServicesPlugin" addRequiredLibraries="true" />
|
||||
|
||||
@@ -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 *; }
|
||||
|
||||
+3
-12
@@ -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")
|
||||
|
||||
|
||||
+1
-1
@@ -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<Project> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user