[K/N] Fix K2 detection in native tests
This updates how the requested language version is detected in native tests, after language version 2 has become the default.
This commit is contained in:
committed by
Space Cloud
parent
56f53fbd0b
commit
3556533d95
@@ -53,12 +53,9 @@ object PlatformInfo {
|
||||
|
||||
@JvmStatic
|
||||
fun isK2(project: Project): Boolean {
|
||||
return project.globalTestArgs.contains("-language-version") &&
|
||||
// Enough future versions are specified until K1 will be stopped to test
|
||||
(project.globalTestArgs.contains("2.0")
|
||||
|| project.globalTestArgs.contains("2.1")
|
||||
|| project.globalTestArgs.contains("2.2")
|
||||
)
|
||||
val idx = project.globalTestArgs.indexOf("-language-version")
|
||||
if (idx == -1) return true
|
||||
return project.globalTestArgs[idx + 1].toDouble() >= 2.0
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
Reference in New Issue
Block a user