mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
New build syntax.
This commit is contained in:
parent
70c4a3960f
commit
fded2800b6
6 changed files with 62 additions and 57 deletions
|
@ -14,7 +14,7 @@ import javax.inject.Inject
|
|||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
abstract public class JvmCompilerPlugin @Inject constructor(
|
||||
abstract class JvmCompilerPlugin @Inject constructor(
|
||||
open val localRepo: LocalRepo,
|
||||
open val files: KFiles,
|
||||
open val depFactory: DepFactory,
|
||||
|
@ -121,15 +121,15 @@ abstract public class JvmCompilerPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
|
||||
public class TestConfig(val project: Project) {
|
||||
class TestConfig(val project: Project) {
|
||||
fun args(vararg arg: String) {
|
||||
project.testArgs.addAll(arg)
|
||||
}
|
||||
}
|
||||
|
||||
@Directive
|
||||
public fun test(project: Project, init: TestConfig.() -> Unit) : TestConfig {
|
||||
val result = TestConfig(project)
|
||||
fun Project.test(init: TestConfig.() -> Unit) : TestConfig {
|
||||
val result = TestConfig(this)
|
||||
result.init()
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue