https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
b

bod

12/12/2020, 4:23 PM
Hello, World! In gradle kts file, isn't there a syntax to be able to declare a dependency like this
implementation("group", "artifact", version)
instead of
implementation("group:artifact:$version")
? I could write a small fun for this of course but first checking if I'm not missing something that already exist?
m

mbonnin

12/12/2020, 10:58 PM
Copy code
implementation(group = group, name = artifact, version = version)
seems to work for me
That's in my generated accessors so maybe you need to use the
plugins {}
syntax for it?
Although since the regular
implementation()
is there, I'd expect the other one to be there too
b

bod

12/13/2020, 1:56 PM
hey 👋 🙂 Well for me it works in regular projects but not for multiplatform ones. If I middle click I see this, the version with 3 parameter doesn't seem to be there:
l

louiscad

12/13/2020, 4:54 PM
I think it's an overlook from the authors of the KMP Gradle DSL authors, you can probably just request the feature on kotl.in/issue
👍 2
m

mbonnin

12/13/2020, 9:35 PM
Indeed, can confirm it doesn't work for multiplatform
KotlinDependencyHandler
. Interesting that it's not generated accessors in the multiplatform case
2 Views