`maven { url = uri("https://...") }`
# gradle
b
maven { url = uri("https://...") }
o
I still wonder why it is not just
maven("https://…")
g
Because of this https://github.com/gradle/kotlin-dsl/issues/256#issuecomment-293624947 To be honest I don’t agree that this syntax is “adhoc shortcut”, just because it’s one of the most used things in Gradle dsl and it actually improve readability and make configs shorter.
s
I still think it would deserve a
maven("https://…")
shortcut, and I don't think adding implicit conversion to Kotlin is a good idea, it is fine for Groovy but not from Kotlin IMO, too dynamic, too magic. While I agree that libraries and framework should not abuse of shortcuts, in that case I think it is relevant, this is used so many times, people will be confused by
uri
versus
url
, etc.
3
g
@sdeleuze 100% agree with your opinion
b
We will reconsider the shortcut.
🎉 4
o
May be also consider unifying
mavenLocal
to
maven(local)
and
maven(central)
, etc
b
Interesting idea, what
local
and
central
would be in that scenario?
o
top-level vals?
b
I see, you mean like string constants?
I’d be tempted to introduce an enum or some opaque class
o
yep, whatever. Just an idea, I don’t have strong opinion on it.
👌 1
j
You'd need
maven(google)
to match the current defaults already supported by gradle.
g
Current shortcuts
google()
and
jcenter()
more abstract, because hide repository type from client.
b
good point
j
IE they could be ivy for all the API cosumer knows?
b
yes