Launch common tests on local JVM via run gutter
For projects with android target and without jvm one. #KT-42463
This commit is contained in:
+9
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -473,8 +473,7 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionComp
|
||||
val dependsOnReverseGraph: MutableMap<String, MutableSet<KotlinSourceSet>> = HashMap()
|
||||
mppModel.targets.forEach { target ->
|
||||
target.compilations.forEach { compilation ->
|
||||
val testRunTasks = target.testRunTasks
|
||||
.filter { task -> task.compilationName == compilation.name }
|
||||
val testRunTasks = target.testTasksFor(compilation)
|
||||
.map {
|
||||
ExternalSystemTestRunTask(
|
||||
it.taskName,
|
||||
@@ -1102,6 +1101,13 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionComp
|
||||
}
|
||||
}
|
||||
|
||||
private fun KotlinTarget.testTasksFor(compilation: KotlinCompilation) = testRunTasks.filter { task ->
|
||||
when (name) {
|
||||
"android" -> task.taskName.endsWith(compilation.name, true)
|
||||
else -> task.compilationName == compilation.name
|
||||
}
|
||||
}
|
||||
|
||||
fun ProjectResolverContext.getMppModel(gradleModule: IdeaModule): KotlinMPPGradleModel? {
|
||||
val mppModel = this.getExtraProject(gradleModule, KotlinMPPGradleModel::class.java)
|
||||
return if (mppModel is Proxy) {
|
||||
|
||||
Reference in New Issue
Block a user