Search in sources :

Example 1 with Defaults

use of org.gradle.model.Defaults in project gradle by gradle.

the class PlayDistributionPlugin method createDistributions.

@Defaults
void createDistributions(@Path("distributions") PlayDistributionContainer distributions, @Path("binaries") ModelMap<PlayApplicationBinarySpecInternal> playBinaries, PlayPluginConfigurations configurations, ServiceRegistry serviceRegistry) {
    FileOperations fileOperations = serviceRegistry.get(FileOperations.class);
    Instantiator instantiator = serviceRegistry.get(Instantiator.class);
    for (PlayApplicationBinarySpecInternal binary : playBinaries) {
        PlayDistribution distribution = instantiator.newInstance(DefaultPlayDistribution.class, binary.getProjectScopedName(), fileOperations.copySpec(), binary);
        distribution.setBaseName(binary.getProjectScopedName());
        distributions.add(distribution);
    }
}
Also used : PlayApplicationBinarySpecInternal(org.gradle.play.internal.PlayApplicationBinarySpecInternal) FileOperations(org.gradle.api.internal.file.FileOperations) PlayDistribution(org.gradle.play.distribution.PlayDistribution) DefaultPlayDistribution(org.gradle.play.internal.distribution.DefaultPlayDistribution) Instantiator(org.gradle.internal.reflect.Instantiator) Defaults(org.gradle.model.Defaults)

Aggregations

FileOperations (org.gradle.api.internal.file.FileOperations)1 Instantiator (org.gradle.internal.reflect.Instantiator)1 Defaults (org.gradle.model.Defaults)1 PlayDistribution (org.gradle.play.distribution.PlayDistribution)1 PlayApplicationBinarySpecInternal (org.gradle.play.internal.PlayApplicationBinarySpecInternal)1 DefaultPlayDistribution (org.gradle.play.internal.distribution.DefaultPlayDistribution)1