24

with gradle-groovy it is possible to create a new configuration with:

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
    
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?

Jon Bates
  • 3,055
  • 2
  • 30
  • 48
guenhter
  • 11,255
  • 3
  • 35
  • 66

1 Answers1

29

Could you please try:

val explode by configurations.creating

or:

val explode = configurations.create("explode")

The following build.gradle.kts script works fine:

repositories {
    mavenCentral()
}

val explode by configurations.creating

dependencies {
    explode("org.apache.samza:samza-shell:0.13.1")
}
Jon Bates
  • 3,055
  • 2
  • 30
  • 48
Opal
  • 81,889
  • 28
  • 189
  • 210