Related with kotlin dsl how we change this piece o...
# gradle
d
Related with kotlin dsl how we change this piece of code
Copy code
maven {
      url "<http://abc.com|abc.com>"
      credentials(AwsCredentials) {
        accessKey = "a"
        secretKey = "b"
        sessionToken = "c"
      }
    }
to kotlin dsl ?
especially for the credential part
Copy code
maven{
      url = URI(beiartf_url)
    }
g
url = URI(beiartf_url)
This is correct
You also can use:
maven(beiartf_url) {}
So I would rewrite it like:
Copy code
maven("<http://abc.com|abc.com>") {
    credentials(AwsCredentials::class) {
        accessKey = "a"
        secretKey = "b"
        sessionToken = "c"
    }
}
o
for kotlin dsl, assuming that it's a NamedDomainObjectContainer,
register<AwsCredentials>("credentials") { ... }
is preferable imo
d
Thank you so much
g
No, it’s incorrect
credentials
is not NamedDomainObjectContainer
o
ah, okay. wasn't sure because it is in a similar style