(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:
+1
-6
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user