Based on the previously mentioned limitation of Java Sources, I'm going to
guess that you are creating a single sourceSets with all the path (that's
what Jake's plugin does).

In this case, ignore registerProductFlavorSourceProvider and only use
registerJavaArtifact.
Just wrap your sourceSets  with wrapJavaSourceSet and you're done.

Later, using registerProductFlavor/BuildTypeSourceProvider will be better
as we'll be able to do refactoring across those folders.

In the future SourceSets will not be tied to a compileTask so we won't be
able to do that. (there'll be another concept of binary that is tied to
1-to-many sourcesets, so we might be able to do something similar but I
don't know yet).

For the dependency I need to figure out what to do. when you combine
configurations, things are complicated. We probably won't want to pass the
configuration objects to the API directly. First it's important that you
combine them to resolve them (so that you resolve them as a single graph
rather than multiple graphs that may conflict with each other) and second,
we'll probably want the resolved artifacts instead anyway.


On Thu, Dec 19, 2013 at 2:52 PM, Jürgen Cruz <[email protected]> wrote:

> I can't get the grasp of what is registerProductFlavorSourceProvider and
> registerJavaArtifact are doing. they both need a sourceprovider so why not
> just register the artifact for the variant (with registerJavaArtifact) and
> the provider for the artifact incluides all the combination of dirs.
> (including src/test). why do i need to register twice the sourceProviders?
> would calling android.wrapJavaSourceSet(theSourceSet) generate the sole
> sourceProvider I need to pass to registerJavaArtifact per variant?
>
> Also, you mentioned that the dependency information is missing. I get
> that. what are the plans to introduce this? Right now my Java Source sets
> have already the configuration needed. it would be awesome if a function
> like registerJavaSourceSet could take this source set (which has the info
> about its compiletask, classpath, outdir, configurations, etc) and create
> the artifact and register it itself.
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to