mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Rename.
This commit is contained in:
parent
c4f4366357
commit
f3c2e8f4c2
3 changed files with 7 additions and 7 deletions
|
@ -9,7 +9,7 @@ class TestConfig(val project: Project) {
|
|||
val testIncludes = arrayListOf("**/*Test.class")
|
||||
val testExcludes = arrayListOf<String>()
|
||||
|
||||
var configName: String = ""
|
||||
var name: String = ""
|
||||
|
||||
fun args(vararg arg: String) {
|
||||
testArgs.addAll(arg)
|
||||
|
@ -38,11 +38,11 @@ class TestConfig(val project: Project) {
|
|||
fun Project.test(init: TestConfig.() -> Unit) = let { project ->
|
||||
with(testConfigs) {
|
||||
val tf = TestConfig(project).apply { init() }
|
||||
if (! map { it.configName }.contains(tf.configName)) {
|
||||
if (! map { it.name }.contains(tf.name)) {
|
||||
add(tf)
|
||||
} else {
|
||||
throw KobaltException("Test configuration \"${tf.configName}\" already exists, give it a different "
|
||||
+ "name with test { configName = ... }")
|
||||
throw KobaltException("Test configuration \"${tf.name}\" already exists, give it a different "
|
||||
+ "name with test { name = ... }")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ abstract class GenericTestRunner : ITestRunnerContributor {
|
|||
val java = jvm.javaExecutable
|
||||
var result = false
|
||||
|
||||
val testConfig = project.testConfigs.firstOrNull { it.configName == configName }
|
||||
val testConfig = project.testConfigs.firstOrNull { it.name == configName }
|
||||
|
||||
if (testConfig != null) {
|
||||
val args = args(project, classpath, testConfig)
|
||||
|
|
|
@ -78,11 +78,11 @@ open class JvmCompilerPlugin @Inject constructor(
|
|||
project.testConfigs.add(TestConfig(project))
|
||||
}
|
||||
project.testConfigs.forEach { config ->
|
||||
val taskName = if (config.configName.isEmpty()) "test" else "test" + config.configName
|
||||
val taskName = if (config.name.isEmpty()) "test" else "test" + config.name
|
||||
|
||||
taskManager.addTask(this, project, taskName,
|
||||
runAfter = listOf(JvmCompilerPlugin.TASK_COMPILE, JvmCompilerPlugin.TASK_COMPILE_TEST),
|
||||
task = { taskTest(project, config.configName)} )
|
||||
task = { taskTest(project, config.name)} )
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue