Search in sources :

Example 1 with DefaultEtaConfiguration

use of com.typelead.gradle.eta.internal.DefaultEtaConfiguration in project gradle-eta by typelead.

the class EtaBasePlugin method populateEtaConfiguration.

private void populateEtaConfiguration(final Configuration configuration) {
    final DefaultEtaConfiguration etaConfiguration = ExtensionHelper.createExtension(configuration, ETA_CONFIGURATION_EXTENSION_NAME, DefaultEtaConfiguration.class, configuration, mavenRepository);
    DomainObjectCollection<EtaDependency> dependencies = etaConfiguration.getDependencies();
    configuration.getDependencies().all(dependency -> {
        if (dependency instanceof ProjectDependency) {
            final ProjectDependency projectDependency = (ProjectDependency) dependency;
            dependencies.add(new DefaultEtaProjectDependency(projectDependency.getDependencyProject(), projectDependency.getTargetConfiguration()));
        } else if (dependency instanceof EtaDependency) {
            dependencies.add((EtaDependency) dependency);
        }
    });
}
Also used : DefaultEtaProjectDependency(com.typelead.gradle.eta.internal.DefaultEtaProjectDependency) EtaDependency(com.typelead.gradle.eta.api.EtaDependency) DefaultEtaConfiguration(com.typelead.gradle.eta.internal.DefaultEtaConfiguration) ProjectDependency(org.gradle.api.artifacts.ProjectDependency) DefaultEtaProjectDependency(com.typelead.gradle.eta.internal.DefaultEtaProjectDependency)

Aggregations

EtaDependency (com.typelead.gradle.eta.api.EtaDependency)1 DefaultEtaConfiguration (com.typelead.gradle.eta.internal.DefaultEtaConfiguration)1 DefaultEtaProjectDependency (com.typelead.gradle.eta.internal.DefaultEtaProjectDependency)1 ProjectDependency (org.gradle.api.artifacts.ProjectDependency)1