kobalt
kobalt copied to clipboard
Add a top-level scope for Kobalt code
Add a kobalt directive so you can declare the kobalt build file without using top-level variables.
For example:
val re = repos()
val pl = plugins()
val pr = project { ... does something }
Could be written as:
val kb = kobalt {
repos(...)
plugins(...)
project {
...
}
}
Interesting suggestion, I like it! I'd like to get more opinions, will ping the channel.
Why even require declaring variables in the first place?
To modify the above examples:
repos()
plugins()
project {}
and
kobalt {
repos()
plugins()
project {
}
}
The problem is that Kotlin now doesn't support top-level expressions without assigning them to a variable :(
@EddieRingle: That's not a valid Kotlin file.
It would (probably) be a valid Kotlin script but these are not supported yet.
@kmruiz @cbeust Whoops, forgot about that. Darn. :(