Java 类org.gradle.api.internal.file.copy.CopySpecInternal 实例源码

项目:gradle-plugins    文件:WarOverlayPlugin.java   
@Override
public void apply(Project project) {
    this.project = project;
    project.getPluginManager().apply(WarPlugin.class);

    project.getTasks().withType(War.class, warTask -> {

        NamedDomainObjectContainer<WarOverlay> warOverlays = project.container(WarOverlay.class, name -> new WarOverlay(name, warTask));
        warTask.getExtensions().add("overlays", warOverlays);

        project.afterEvaluate(p -> warOverlays.all(overlay -> {

            if (overlay.isEnabled()) {
                configureOverlay(overlay);
            } else {
                Collection<CopySpecInternal> children = (Collection<CopySpecInternal>) overlay.getWarTask().getRootSpec().getChildren();
                children.remove(overlay.getWarCopySpec());
            }

        }));
    });

}
项目:gradle-plugins    文件:WarOverlayPlugin.java   
@Override
public void apply(Project project) {
    this.project = project;
    project.getPluginManager().apply(WarPlugin.class);

    project.getTasks().withType(War.class, warTask -> {

        NamedDomainObjectContainer<WarOverlay> warOverlays = project.container(WarOverlay.class, name -> new WarOverlay(name, warTask));
        warTask.getExtensions().add("overlays", warOverlays);

        project.afterEvaluate(p -> warOverlays.all(overlay -> {

            if (overlay.isEnabled()) {
                configureOverlay(overlay);
            } else {
                Collection<CopySpecInternal> children = (Collection<CopySpecInternal>) overlay.getWarTask().getRootSpec().getChildren();
                children.remove(overlay.getWarCopySpec());
            }

        }));
    });

}
项目:Reer    文件:Copy.java   
@Override
protected CopySpecInternal createRootSpec() {
    Instantiator instantiator = getInstantiator();
    FileResolver fileResolver = getFileResolver();

    return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
项目:Reer    文件:Sync.java   
@Override
protected CopySpecInternal createRootSpec() {
    Instantiator instantiator = getInstantiator();
    FileResolver fileResolver = getFileResolver();

    return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
项目:Pushjet-Android    文件:Copy.java   
@Override
protected CopySpecInternal createRootSpec() {
    Instantiator instantiator = getInstantiator();
    FileResolver fileResolver = getFileResolver();

    return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
项目:Pushjet-Android    文件:Copy.java   
@Override
protected CopySpecInternal createRootSpec() {
    Instantiator instantiator = getServices().get(Instantiator.class);
    FileResolver fileResolver = getServices().get(FileResolver.class);

    return instantiator.newInstance(DestinationRootCopySpec.class, fileResolver, super.createRootSpec());
}
项目:Reer    文件:Ear.java   
/**
 * A location for dependency libraries to include in the 'lib' directory of the EAR archive.
 */
@Internal
public CopySpec getLib() {
    return ((CopySpecInternal) lib).addChild();
}
项目:Reer    文件:AbstractCopyTask.java   
protected CopySpecInternal createRootSpec() {
    Instantiator instantiator = getInstantiator();
    FileResolver fileResolver = getFileResolver();
    return instantiator.newInstance(DefaultCopySpec.class, fileResolver, instantiator);
}
项目:Reer    文件:AbstractCopyTask.java   
@Internal
public CopySpecInternal getRootSpec() {
    return rootSpec;
}
项目:Reer    文件:AbstractCopyTask.java   
@Internal
protected CopySpecInternal getMainSpec() {
    return mainSpec;
}
项目:gradle-defaults    文件:ExtGhPagesPlugin.java   
private static CopySpecInternal pagesCopySpec(Project project) {
    val githubPages = githubPages(project.getRootProject());
    if (githubPages == null) throw new IllegalStateException("No GithubPagesPluginExtension");
    return (CopySpecInternal)githubPages.getPages();
}