Package org.netbeans.gradle.model.java

Examples of org.netbeans.gradle.model.java.JavaOutputDirs


    }

    private static JavaSourceSet createSources(String name) {
        JavaSourceSet.Builder result = new JavaSourceSet.Builder(
                name,
                new JavaOutputDirs(new File(name + "-out-classes"), new File(name + "-out-res"), Collections.<File>emptySet()));
        result.addSourceGroup(createSourceGroup(name));
        return result.create();
    }
View Full Code Here


        ProjectClassPaths classPaths = fetchAllDependencies(module, cache);
        File buildOutputDir = getDefaultBuildDir(projectDir);
        File classesDir = new File(buildOutputDir, "classes");
        File resourcesDir = new File(buildOutputDir, "resources");

        JavaOutputDirs mainOutputs = new JavaOutputDirs(
                new File(classesDir, JavaSourceSet.NAME_MAIN),
                new File(resourcesDir, JavaSourceSet.NAME_MAIN),
                Collections.<File>emptyList());

        JavaSourceSet.Builder main
                = new JavaSourceSet.Builder(JavaSourceSet.NAME_MAIN, mainOutputs);
        main.setClasspaths(classPaths.main);

        JavaOutputDirs testOutputs = new JavaOutputDirs(
                new File(classesDir, JavaSourceSet.NAME_TEST),
                new File(resourcesDir, JavaSourceSet.NAME_TEST),
                Collections.<File>emptyList());

        JavaSourceSet.Builder test
View Full Code Here

        if (file == null) {
            return null;
        }

        for (JavaSourceSet sourceSet: projectModel.getMainModule().getSources()) {
            JavaOutputDirs outputDirs = sourceSet.getOutputDirs();
            outputDirs.getClassesDir();

            if (isInOneOf(file, sourceSet.getClasspaths().getCompileClasspaths())) {
                return sourceSet;
            }
View Full Code Here

        paths.addAll(paths2);
        setClassPathResources(classPathKey, paths);
    }

    private static List<PathResourceImplementation> getBuildOutputDirsAsPathResources(JavaSourceSet sourceSet) {
        JavaOutputDirs outputDirs = sourceSet.getOutputDirs();
        PathResourceImplementation classesDir = toPathResource(outputDirs.getClassesDir());
        PathResourceImplementation resourcesDir = toPathResource(outputDirs.getClassesDir());

        List<PathResourceImplementation> result = new ArrayList<>(2);
        if (classesDir != null) result.add(classesDir);
        if (resourcesDir != null) result.add(resourcesDir);
        return result;
View Full Code Here

        eventSource.init(this.changes);
    }

    private static List<File> tryGetSourceRoots(NbJavaModule module, File binaryRoot) {
        for (JavaSourceSet sourceSet: module.getSources()) {
            JavaOutputDirs outputDirs = sourceSet.getOutputDirs();
            if (NbFileUtils.isParentOrSame(outputDirs.getClassesDir(), binaryRoot)) {
                List<File> result = new LinkedList<>();

                for (JavaSourceGroup sourceGroup: sourceSet.getSourceGroups()) {
                    result.addAll(sourceGroup.getSourceRoots());
                }
View Full Code Here

    }

    private JavaSourceSet emptySourceSet(String name) {
        File classesDir = new File(properties.getProjectDir(), "nb-virtual-classes");
        File resourcesDir = new File(properties.getProjectDir(), "nb-virtual-resources");
        JavaOutputDirs output = new JavaOutputDirs(classesDir, resourcesDir, Collections.<File>emptyList());
        JavaSourceSet.Builder result = new JavaSourceSet.Builder(name, output);
        return result.create();
    }
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.model.java.JavaOutputDirs

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.