Alexander Kitaev wrote:
>
> I'd like to get all artifacts that are part of this build (either direct
> or indirect, but exclude artifacts that are external to this build). Using
> DependencySpecs.type(PROJECT) does not work, because it gives me only
> direct dependency that is later resolved to all artifacts, both internal
> and external.
>
You could filter the artifacts based on their module group and/or name.
Something like:
def allArtifacts =
configurations.runtime.resolvedConfiguration.resolvedArtifacts()
def groups = allprojects.group
def buildArtifacts = allArtifacts.findAll {
groups.contains(it.resolvedDependency.moduleGroup) }
If you simply need all artifacts produced by the whole build, you could get
them from the configurations they are published to. Something like:
def buildArtifacts = allprojects.configurations.archives.artifacts.flatten()
--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradleware
http://www.gradleware.com
Creator, Spock Framework
http://spockframework.org
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Get-all-direct-dependencies-artifacts-tp4328817p4329719.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email