On 21/06/2013, at 1:07, Xavier Ducrohet <x...@google.com> wrote:

> I was going to file a bug but since this is a private API, maybe it's easier 
> to post here.
> (I tried using this API from a build.gradle to make a repeatable project but 
> it fails to interpret the build.gradle)
> 
> 
> In the android plugin, for library project we call 
> 
> project.plugins.withType(MavenPlugin) {
>   project.conf2ScopeMappings.addMapping(300, foo, "compile")
>   project.conf2ScopeMappings.addMapping(300, bar, "compile")
> }
> 
> to set proper dependencies in the pom. We are mostly doing this because we 
> have more than one configuration. This works fine.
> 
> I'm doing some clean up work in the way we resolve our dependencies as we 
> don't want to resolve foo and bar separately but instead we want to resolve 
> the combination of foo and bar, so I started using composite configuration.
> 
> Doing this:
> 
> Configuration foobar = project.configurations.create("foobar")
> foobar.setExtendsFrom(project.configurations.foo)
> foobar.setExtendsFrom(project.configurations.bar)
> project.plugins.withType(MavenPlugin) {
>   project.conf2ScopeMappings.addMapping(300, foobar, "compile")
> }
> 
> will create a pom file with no dependencies.
> 
> Am I missing something? I really want the pom to contain the same 
> dependencies that we are using  for compilation.

Only the declared dependencies are used, not dependencies that are part of the 
config from configuration extension.

You need to map both "foo" and "bar" configs separately. You can map two Gradle 
configurations to the same Maven scope.

Have you considered using the new (still incubating) publishing stuff? 
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to