I was thinking about this and I was wondering if it would make more sense to push the backing type further up the DSL. So instead of specifying the type at the credential method, you would specify it at the repository declaration:
repositories { maven(S3Maven) { bucket = 'mybucket' credentials { accessKey = 'key' secretKey = 'secret' } } } This way, then the DSL can be evaluated for the proper methods and types for that specific backing implementation. So in this case, the normal maven {} and ivy {} methods would use a default http/https a implementation. Thoughts? — John On Sat, Sep 6, 2014 at 12:21 PM, adrianbk [via Gradle] <ml-node+s1045684n5713126...@n5.nabble.com> wrote: > I took an initial stab at starting with the DSL: > credentials(AwsCredentials){ > ... > } > My fork is here: https://github.com/adrianbk/gradle/tree/maven-aws-s3 > I was wondering if one of the devs could take a look? A couple of things > feel a bit nasty and wanted to get some pointers. > If you take a look at RepositoryCredentialsDslIntegrationTest the scenario > 'passwordTyped' fails because I can't specify specific enough 'public void > credentials(..)' methods in AbstractAuthenticationSupportedRepository to > support different implementations of RepositoryCredentials. It feels a bit > like a hack to get around how the ConfigureUtil/delegate stuff works. > Wondering if there is a better approach or an example of how to use > configuration closures with specific types in DSL's. > _______________________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://gradle.1045684.n5.nabble.com/Contribution-request-add-support-for-SFtp-and-SSH-for-publishing-and-resolving-tp5712306p5713126.html > To start a new topic under gradle-dev, email > ml-node+s1045684n1436218...@n5.nabble.com > To unsubscribe from gradle-dev, visit > http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1436218&code=am9obi5yLmVuZ2VsbWFuQGdtYWlsLmNvbXwxNDM2MjE4fDIyMTUyNjEzNQ== -- View this message in context: http://gradle.1045684.n5.nabble.com/Contribution-request-add-support-for-SFtp-and-SSH-for-publishing-and-resolving-tp5712306p5713127.html Sent from the gradle-dev mailing list archive at Nabble.com.