mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Use direct dependencies to determine the test runner.
This commit is contained in:
parent
743ec4e177
commit
bc4a28727f
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,6 @@ package com.beust.kobalt.internal
|
|||
|
||||
import com.beust.kobalt.*
|
||||
import com.beust.kobalt.api.*
|
||||
import com.beust.kobalt.maven.DependencyManager2
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.google.common.annotations.VisibleForTesting
|
||||
import java.io.File
|
||||
|
@ -24,9 +23,8 @@ abstract class GenericTestRunner: ITestRunnerContributor {
|
|||
= TaskResult(runTests(project, context, classpath, configName))
|
||||
|
||||
override fun affinity(project: Project, context: KobaltContext) : Int {
|
||||
val td = Kobalt.INJECTOR.getInstance(DependencyManager2::class.java).resolve(project, context, isTest = true)
|
||||
val result =
|
||||
if (td.any { it.id.contains(dependencyName) }) IAffinity.DEFAULT_POSITIVE_AFFINITY
|
||||
if (project.testDependencies.any { it.id.contains(dependencyName) }) IAffinity.DEFAULT_POSITIVE_AFFINITY
|
||||
else 0
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue