(CoroutineDebugger) embed agent into gradle JavaExec task

#KT-40417 fixed
This commit is contained in:
Vladimir Ilmov
2020-07-17 16:45:26 +02:00
parent 217428212f
commit b43b238030
@@ -28,7 +28,7 @@ class KotlinGradleCoroutineDebugProjectResolver : AbstractProjectResolverExtensi
//language=Gradle
"""
gradle.taskGraph.beforeTask { Task task ->
if (task instanceof Test) {
if (task instanceof Test || task instanceof JavaExec) {
def kotlinxCoroutinesCoreJar = task.classpath.find { it.name.startsWith("kotlinx-coroutines-core") }
if (kotlinxCoroutinesCoreJar) {
def results = (kotlinxCoroutinesCoreJar.getName() =~ /kotlinx-coroutines-core\-([\d\.]+)\.jar${'$'}/).findAll()