mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Pass TaskResult better in tests.
This commit is contained in:
parent
521dfc327b
commit
2746f57b9a
2 changed files with 36 additions and 26 deletions
|
@ -64,18 +64,20 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
result.addAll(dependencyManager.calculateDependencies(project, context, it))
|
||||
}
|
||||
}
|
||||
return dependencyManager.reorderDependencies(result)
|
||||
val result2 = dependencyManager.reorderDependencies(result)
|
||||
return result2
|
||||
}
|
||||
|
||||
@Task(name = TASK_TEST, description = "Run the tests", runAfter = arrayOf("compile", "compileTest"))
|
||||
fun taskTest(project: Project) : TaskResult {
|
||||
lp(project, "Running tests")
|
||||
if (project.testDependencies.any { it.id.contains("testng")} ) {
|
||||
TestNgRunner(project, testDependencies(project)).runTests()
|
||||
} else {
|
||||
JUnitRunner(project, testDependencies(project)).runTests()
|
||||
}
|
||||
return TaskResult()
|
||||
val success =
|
||||
if (project.testDependencies.any { it.id.contains("testng")} ) {
|
||||
TestNgRunner(project, testDependencies(project)).runTests()
|
||||
} else {
|
||||
JUnitRunner(project, testDependencies(project)).runTests()
|
||||
}
|
||||
return TaskResult(success)
|
||||
}
|
||||
|
||||
@Task(name = TASK_CLEAN, description = "Clean the project", runBefore = arrayOf("compile"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue