Package org.gradle.api.file

Examples of org.gradle.api.file.CopySpec


    }

    @SuppressWarnings({ "serial", "unused" })
    private CopySpec configureDistSpec(Project project)
    {
        CopySpec distSpec = project.copySpec(new Closure<Object>(null) {});
        Jar jar = (Jar) project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME);
       
        distSpec.from(jar);
        distSpec.from(project.getConfigurations().getByName("runtime"));

        return distSpec;
    }
View Full Code Here


    }

    @Override
    public Object call(Object... args)
    {
        CopySpec spec = (CopySpec)getDelegate();
       
        // do filters
        for (String s : filters)
        {
            if (s.startsWith("!")) spec.exclude(s.substring(1));
            else                   spec.include(s);
        }
       
        // expands
       
        if (!expands.isEmpty())
            spec.expand(expands);
       
        if (!Strings.isNullOrEmpty(dir))
            spec.into(dir);
       
        return null;
    }
View Full Code Here

    }

    private DestinationRootCopySpec createCopySpec(Action<? super CopySpec> action) {
        DefaultCopySpec copySpec = new DefaultCopySpec(this.fileResolver, instantiator);
        DestinationRootCopySpec destinationRootCopySpec = new DestinationRootCopySpec(fileResolver, copySpec);
        CopySpec wrapped = instantiator.newInstance(CopySpecWrapper.class, destinationRootCopySpec);
        action.execute(wrapped);
        return destinationRootCopySpec;
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.file.CopySpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.