gradle / kotlin-dsl-samples

Samples builds using the Gradle Kotlin DSL
https://gradle.org/kotlin/
Other
3.71k stars 434 forks source link

Any easy way to add dependency in build.gradle.kts? #1389

Closed Dollyn closed 5 years ago

Dollyn commented 5 years ago

If I use build.gradle, i can still use Alt+Insert > generate dependency to search artifacts. Or I can search in https://mvnrepository.com, and copy&paste a dependency directly.

image

But in build.gradle.kts I got nothing. I have to remember the group name, artifact id, and the deam version, or even the magic string like "org.apache.httpcomponents:httpclient:4.5.10"

JLLeitschuh commented 5 years ago

I recommend contacting the maintainer of mvnrepository.com at info@mvnrepository.com

We don't maintain that site.

Dollyn commented 5 years ago

that is not what i mean. what i want is some way i can add a dependency quickly, which don't need me to remember the group name and version number in my head.

JLLeitschuh commented 5 years ago

I normally copy and paste it from that website and then reformat to match the Koltin DSL API.

gabrielfeo commented 5 years ago

The syntax for Buildr contains a compatible dependency notation, but if the maintainer could add a tab for KTS, that'd be great.