Package org.gradle.jvm

Examples of org.gradle.jvm.ClassDirectoryBinarySpec


            if (binary instanceof JarBinarySpec) {
                JarBinarySpec jarBinary = (JarBinarySpec) binary;
                textOutput.formatln("    Jar file: %s", fileResolver.resolveAsRelativePath(jarBinary.getJarFile()));
            }
            if (binary instanceof ClassDirectoryBinarySpec) {
                ClassDirectoryBinarySpec classDirectoryBinary = (ClassDirectoryBinarySpec) binary;
                textOutput.formatln("    classes dir: %s", fileResolver.resolveAsRelativePath(classDirectoryBinary.getClassesDir()));
                textOutput.formatln("    resources dir: %s", fileResolver.resolveAsRelativePath(classDirectoryBinary.getResourcesDir()));
            }
        }

        if (binary instanceof PlayApplicationBinarySpec) {
            PlayApplicationBinarySpec playBinary = (PlayApplicationBinarySpec) binary;
View Full Code Here


                functionalSourceSet.add(javaSourceSet);
                JvmResourceSet resourceSet = instantiator.newInstance(DefaultJvmResourceSet.class, "resources", sourceSet.getResources(), functionalSourceSet);
                functionalSourceSet.add(resourceSet);

                BinaryContainer binaryContainer = project.getExtensions().getByType(BinaryContainer.class);
                ClassDirectoryBinarySpec binary = binaryContainer.create(String.format("%sClasses", sourceSet.getName()), ClassDirectoryBinarySpec.class);
                ConventionMapping conventionMapping = new DslObject(binary).getConventionMapping();
                conventionMapping.map("classesDir", new Callable<File>() {
                    public File call() throws Exception {
                        return sourceSet.getOutput().getClassesDir();
                    }
                });
                conventionMapping.map("resourcesDir", new Callable<File>() {
                    public File call() throws Exception {
                        return sourceSet.getOutput().getResourcesDir();
                    }
                });

                binary.getSource().add(javaSourceSet);
                binary.getSource().add(resourceSet);

                binary.builtBy(sourceSet.getOutput().getDirs());
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.gradle.jvm.ClassDirectoryBinarySpec

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.