(CoroutineDebugger) minimum supported version kotlinx-coroutines-core.1.3.8

Workaround for starting agent on windows removed, version upgraded in tests
 #KT-40073 fixed
This commit is contained in:
Vladimir Ilmov
2020-07-09 21:27:54 +02:00
parent cd896ae6c8
commit e49f3b567b
8 changed files with 11 additions and 39 deletions
@@ -29,22 +29,17 @@ class KotlinGradleCoroutineDebugProjectResolver : AbstractProjectResolverExtensi
"""
gradle.taskGraph.beforeTask { Task task ->
if (task instanceof Test) {
def kotlinxCoroutinesDebugJar = task.classpath.find { it.name.startsWith("kotlinx-coroutines-debug") }
def kotlinxCoroutinesCoreJar = task.classpath.find { it.name.startsWith("kotlinx-coroutines-core") }
if (kotlinxCoroutinesCoreJar) {
def results = (kotlinxCoroutinesCoreJar.getName() =~ /kotlinx-coroutines-core\-([\d\.]+)\.jar${'$'}/).findAll()
if (results) {
def version = results.first()[1]
if (org.gradle.util.VersionNumber.parse( version ) >= org.gradle.util.VersionNumber.parse('1.3.6')) {
if (org.gradle.util.VersionNumber.parse( version ) >= org.gradle.util.VersionNumber.parse('1.3.8')) {
task.jvmArgs ("-javaagent:${'$'}{kotlinxCoroutinesCoreJar?.absolutePath}", "-ea")
return
}
}
}
if (kotlinxCoroutinesDebugJar) {
task.jvmArgs ("-javaagent:${'$'}{kotlinxCoroutinesDebugJar?.absolutePath}", "-ea")
return
}
}
}
""".trimIndent()