>
> With the above, calling the task doesn't build the artifact coming from
> the other project. It may well be that the way I setup my artifact
> publication is not correct.
>
> I mostly do
>     project.artifacts.add(configName, packagingTask)
> Do I need to do something else?
>

That's all you need to do. The consumer project needs to specify the
project dependency correctly. If the provider project declares artifact in
configuration 'conf', the consumer project should declare project
dependency like this: project(path: ":path:to:project", configuration:
"conf"). More details: declaring project dependency without specifying
target configuration means that you're declaring dependency on 'default'
configuration of the target project. In java projects, 'default'
configuration extends archives, runtime, so adding an artifact to
'archives' makes it visible to consumer projects.

Also, is there any plan to have a direct way to get from a ResolvedArtifact
> to something that is Buildable or a TaskDependency object?
>

I doubt that ResolvedArtifact API will grow. I'd say that it's more likely
that ResolutionResult API will provide artifacts / files and perhaps
Buildables, too.

Hope the helps!
-- 
Szczepan Faber
Principal engineer@gradle; Founder@mockito
Join us for Gradle Summit 2014, June 12th and 13th in Santa Clara, CA:
http://www.gradlesummit.com

Reply via email to