Support alternative to string-based dependency configuration syntax, e.g. "testCompile"(...) #36
DanielThomas
commented
Jun 2, 2016
|
Thought I'd copy this here for you - Kotlin Slack is limited to 10K messages, and I'd expect this to be bumped out of the history pretty quickly: val DependencyHandler.testCompile by DependencyProperty
interface DependencyHandler {
fun add(s: String, s2: String)
}
object DependencyProperty {
operator fun getValue(handler: DependencyHandler, property: KProperty<*>): (String) -> Unit = {
handler.add(property.name, it)
}
}
fun dependencies(d: DependencyHandler.() -> Unit) {
}
fun test() {
dependencies {
testCompile("…")
}
} |
|
Resolving as complete with the above commits. @bamboo, I assume it was just an oversight that you didn't close this yourself. |
bsideup
commented
Jun 22, 2016
|
AFAIR this one was proposed by me :D Yay :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://kotlinlang.slack.com/archives/general/p1463589189004393