Package org.gradle.api.internal.file.collections

Examples of org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext


    }

    private void assertIsDirectoryTree(FileTree classFiles, Set<String> includes, Set<String> excludes) {
        assertThat(classFiles, instanceOf(CompositeFileTree.class));
        CompositeFileTree files = (CompositeFileTree) classFiles;
        DefaultFileCollectionResolveContext context = new DefaultFileCollectionResolveContext();
        files.resolve(context);
        List<? extends FileTree> contents = context.resolveAsFileTrees();
        FileTreeAdapter adapter = (FileTreeAdapter) contents.get(0);
        assertThat(adapter.getTree(), instanceOf(DirectoryFileTree.class));
        DirectoryFileTree directoryFileTree = (DirectoryFileTree) adapter.getTree();
        assertThat(directoryFileTree.getDir(), equalTo(classesDir));
        assertThat(directoryFileTree.getPatterns().getIncludes(), equalTo(includes));
View Full Code Here


                    DefaultConfigurableFileCollection collection = (DefaultConfigurableFileCollection) expected;
                    return new ArrayList<FileCollection>((Set) collection.getFrom());
                }
                if (expected instanceof CompositeFileCollection) {
                    CompositeFileCollection collection = (CompositeFileCollection) expected;
                    DefaultFileCollectionResolveContext context = new DefaultFileCollectionResolveContext();
                    collection.resolve(context);
                    return context.resolveAsFileCollections();
                }
                throw new RuntimeException("Cannot get children of " + expected);
            }

            public void describeTo(Description description) {
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext

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.