Java Code Examples for org.gradle.api.artifacts.Configuration#getArtifacts()

The following examples show how to use org.gradle.api.artifacts.Configuration#getArtifacts() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultConfigurationsToArtifactsConverter.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void addArtifacts(MutableLocalComponentMetaData metaData, Iterable<? extends Configuration> configurations) {
    ModuleVersionIdentifier id = metaData.getId();
    for (Configuration configuration : configurations) {
        for (PublishArtifact publishArtifact : configuration.getArtifacts()) {
            IvyArtifactName ivyArtifact = createIvyArtifact(publishArtifact, id);
            metaData.addArtifact(configuration.getName(), ivyArtifact, publishArtifact.getFile());
        }
    }
}
 
Example 2
Source File: ProjectOutcomesModelBuilder.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
    Configuration configuration = project.getConfigurations().findByName("archives");
    if (configuration != null) {
        for (PublishArtifact artifact : configuration.getArtifacts()) {
            GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
            outcomes.add(outcome);
        }
    }
}
 
Example 3
Source File: ProjectOutcomesModelBuilder.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
    Configuration configuration = project.getConfigurations().findByName("archives");
    if (configuration != null) {
        for (PublishArtifact artifact : configuration.getArtifacts()) {
            GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
            outcomes.add(outcome);
        }
    }
}
 
Example 4
Source File: DefaultConfigurationsToArtifactsConverter.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void addArtifacts(MutableLocalComponentMetaData metaData, Iterable<? extends Configuration> configurations) {
    DefaultModuleDescriptor moduleDescriptor = metaData.getModuleDescriptor();
    for (Configuration configuration : configurations) {
        for (PublishArtifact publishArtifact : configuration.getArtifacts()) {
            Artifact ivyArtifact = createIvyArtifact(publishArtifact, moduleDescriptor.getModuleRevisionId());
            metaData.addArtifact(configuration.getName(), ivyArtifact, publishArtifact.getFile());
        }
    }
}
 
Example 5
Source File: DefaultConfigurationsToArtifactsConverter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void addArtifacts(MutableLocalComponentMetaData metaData, Iterable<? extends Configuration> configurations) {
    ModuleVersionIdentifier id = metaData.getId();
    for (Configuration configuration : configurations) {
        for (PublishArtifact publishArtifact : configuration.getArtifacts()) {
            IvyArtifactName ivyArtifact = createIvyArtifact(publishArtifact, id);
            metaData.addArtifact(configuration.getName(), ivyArtifact, publishArtifact.getFile());
        }
    }
}
 
Example 6
Source File: ProjectOutcomesModelBuilder.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
    Configuration configuration = project.getConfigurations().findByName("archives");
    if (configuration != null) {
        for (PublishArtifact artifact : configuration.getArtifacts()) {
            GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
            outcomes.add(outcome);
        }
    }
}
 
Example 7
Source File: ProjectOutcomesModelBuilder.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
    Configuration configuration = project.getConfigurations().findByName("archives");
    if (configuration != null) {
        for (PublishArtifact artifact : configuration.getArtifacts()) {
            GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
            outcomes.add(outcome);
        }
    }
}
 
Example 8
Source File: DefaultConfigurationsToArtifactsConverter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void addArtifacts(MutableLocalComponentMetaData metaData, Iterable<? extends Configuration> configurations) {
    DefaultModuleDescriptor moduleDescriptor = metaData.getModuleDescriptor();
    for (Configuration configuration : configurations) {
        for (PublishArtifact publishArtifact : configuration.getArtifacts()) {
            Artifact ivyArtifact = createIvyArtifact(publishArtifact, moduleDescriptor.getModuleRevisionId());
            metaData.addArtifact(configuration.getName(), ivyArtifact, publishArtifact.getFile());
        }
    }
}