Prevent IDEA attach debugger to serialize task

Workaround for IDEA-200192

IDEA patches JavaExec tasks and adds
agentlib:jdwp= jvm parameter when running under debug.

Replace parameters after IDEA has finished patching parameters.
This commit is contained in:
Nikolay Krasko
2018-10-08 19:11:14 +03:00
parent 7074909230
commit bd27460694
+6 -1
View File
@@ -26,7 +26,12 @@ val serialize by tasks.creating(JavaExec::class) {
classpath(rootProject.buildscript.configurations["bootstrapCompilerClasspath"])
main = "org.jetbrains.kotlin.serialization.builtins.RunKt"
jvmArgs("-Didea.io.use.nio2=true")
doFirst {
// Reassign to remove debugger options. Workaround for IDEA-200192.
jvmArgs = listOf("-Didea.io.use.nio2=true")
}
args(outDir, *inDirs)
}