With gradle-groovy it is possible to have a custom configuration with a lot of parameters (group, name, version, ext, classifier):
configurations {
explode
}
dependencies {
explode (group: 'org.apache.samza', name: 'samza-shell', ext: 'tgz', classifier: 'dist', version: "$SAMZA_VERSION")
}
But I don't know how to do that with the kotlin-dsl. I tried:
val explode by configurations.creating
dependencies {
explode(group = "org.apache.samza", name = "samza-shell", ext = "tgz", classifier = "dist", version = samzaVersion)
// "explode"(group = "org.apache.samza", name = "samza-shell", ext = "tgz", classifier = "dist", version = samzaVersion)
}
but without success. Any ideas?
It will work this way:
val explode by configurations.creating
dependencies {
explode(mapOf(
"group" to "org.apache.samza",
"name" to "samza-shell",
"ext" to "tgz",
"classifier" to "dist",
"version" to "0.13.1"
)
)
}
To be honest, for the sake of brevity, I'd rather go with string interpolation.
Also, with groovy, a instance of Map
is passed as well.