Search in sources :

Example 6 with EtaDependency

use of com.typelead.gradle.eta.api.EtaDependency in project gradle-eta by typelead.

the class DefaultEtaConfiguration method getAllArtifacts.

@Override
public Set<Provider<File>> getAllArtifacts(final Project project) {
    Set<Provider<File>> allArtifacts = new LinkedHashSet<Provider<File>>();
    allArtifacts.addAll(artifacts);
    for (EtaDependency dependency : getDependencies()) {
        if (dependency instanceof EtaProjectDependency) {
            final EtaProjectDependency projectDependency = ((EtaProjectDependency) dependency);
            final EtaConfiguration etaConfiguration = ConfigurationUtils.getEtaConfiguration(projectDependency.getProject(project), projectDependency.getTargetConfiguration());
            if (etaConfiguration != null) {
                allArtifacts.addAll(etaConfiguration.getAllArtifacts(project));
            }
        }
    }
    for (Configuration configuration : parentConfiguration.getExtendsFrom()) {
        final EtaConfiguration etaConfiguration = ExtensionHelper.getExtension(configuration, EtaConfiguration.class);
        allArtifacts.addAll(etaConfiguration.getAllArtifacts(project));
    }
    return allArtifacts;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) EtaProjectDependency(com.typelead.gradle.eta.api.EtaProjectDependency) EtaConfiguration(com.typelead.gradle.eta.api.EtaConfiguration) Configuration(org.gradle.api.artifacts.Configuration) EtaDependency(com.typelead.gradle.eta.api.EtaDependency) EtaConfiguration(com.typelead.gradle.eta.api.EtaConfiguration) File(java.io.File) Provider(org.gradle.api.provider.Provider)

Aggregations

EtaDependency (com.typelead.gradle.eta.api.EtaDependency)6 EtaConfiguration (com.typelead.gradle.eta.api.EtaConfiguration)4 EtaProjectDependency (com.typelead.gradle.eta.api.EtaProjectDependency)4 LinkedHashSet (java.util.LinkedHashSet)4 Configuration (org.gradle.api.artifacts.Configuration)4 ArrayList (java.util.ArrayList)3 Project (org.gradle.api.Project)3 File (java.io.File)2 ProjectDependency (org.gradle.api.artifacts.ProjectDependency)2 Provider (org.gradle.api.provider.Provider)2 EtaDirectDependency (com.typelead.gradle.eta.api.EtaDirectDependency)1 EtaGitDependency (com.typelead.gradle.eta.api.EtaGitDependency)1 HasPackageName (com.typelead.gradle.eta.api.HasPackageName)1 SourceRepository (com.typelead.gradle.eta.api.SourceRepository)1 ConfigurationUtils (com.typelead.gradle.eta.internal.ConfigurationUtils)1 DefaultEtaConfiguration (com.typelead.gradle.eta.internal.DefaultEtaConfiguration)1 DefaultEtaProjectDependency (com.typelead.gradle.eta.internal.DefaultEtaProjectDependency)1 EtlasMavenRepository (com.typelead.gradle.eta.internal.EtlasMavenRepository)1 EtaBasePlugin (com.typelead.gradle.eta.plugins.EtaBasePlugin)1 ExtensionHelper (com.typelead.gradle.utils.ExtensionHelper)1