Examples of JavaSourceSet


Examples of org.gradle.language.java.JavaSourceSet

                    return PlatformJavaCompile.class;
                }

                public void configureTask(Task task, BinarySpec binarySpec, LanguageSourceSet sourceSet) {
                    PlatformJavaCompile compile = (PlatformJavaCompile) task;
                    JavaSourceSet javaSourceSet = (JavaSourceSet) sourceSet;
                    JvmBinarySpec binary = (JvmBinarySpec) binarySpec;

                    compile.setDescription(String.format("Compiles %s.", javaSourceSet));
                    compile.setDestinationDir(binary.getClassesDir());
                    compile.setToolChain(binary.getToolChain());
                    compile.setPlatform(binary.getTargetPlatform());

                    compile.setSource(javaSourceSet.getSource());
                    compile.setClasspath(javaSourceSet.getCompileClasspath().getFiles());
                    compile.setTargetCompatibility(binary.getTargetPlatform().getTargetCompatibility().toString());
                    compile.setSourceCompatibility(binary.getTargetPlatform().getTargetCompatibility().toString());

                    compile.setDependencyCacheDir(new File(compile.getProject().getBuildDir(), "jvm-dep-cache"));
                    compile.dependsOn(javaSourceSet);
View Full Code Here

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

    private ClassPathKey getClassPathType(NbJavaModel projectModel, FileObject fileObj, String type) {
        if (type == null) {
            return null;
        }

        JavaSourceSet sourceSet = findAssociatedSourceSet(projectModel, fileObj);
        if (sourceSet == null) {
            return null;
        }

        if (ClassPath.BOOT.equals(type)) {
            return SpecialClassPath.BOOT;
        }

        String name = sourceSet.getName();

        switch (type) {
            case ClassPath.SOURCE:
                return new SourceSetClassPathType(name, ClassPathType.SOURCES);
            case JavaClassPathConstants.PROCESSOR_PATH: /* falls through */
 
View Full Code Here

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

                return true;
            }

            Map<String, JavaSourceSet> sources2 = getSourceSetMap(module2);
            for (JavaSourceSet sourceSet1: module1.getSources()) {
                JavaSourceSet sourceSet2 = sources2.get(sourceSet1.getName());
                if (sourceSet2 == null) {
                    return true;
                }

                if (!isClassPathSame(sourceSet1, sourceSet2)) {
View Full Code Here

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

            NbJavaModule mainModule = currentModel.getMainModule();
            classpaths.removeAll(mainModule.getAllBuildOutputs());

            for (String inheritedName: sourceSetDependencies) {
                JavaSourceSet inherited = mainModule.tryGetSourceSetByName(inheritedName);
                if (inherited != null) {
                    classpaths.removeAll(inherited.getClasspaths().getCompileClasspaths());
                    classpaths.removeAll(inherited.getClasspaths().getRuntimeClasspaths());
                    classpaths.remove(inherited.getOutputDirs().getClassesDir());
                    classpaths.remove(inherited.getOutputDirs().getResourcesDir());
                    classpaths.removeAll(inherited.getOutputDirs().getOtherDirs());
                }
            }

            List<SingleNodeFactory> dependencyNodes = filesToNodes(currentModel, classpaths);
            dependencyNodes = sortDependencyNodes(dependencyNodes);
View Full Code Here

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

        return emptySourceSet(name);
    }

    public JavaSourceSet getMainSourceSet() {
        JavaSourceSet result = mainSourceSetRef.get();
        if (result == null) {
            mainSourceSetRef.set(findByNameOrEmpty(JavaSourceSet.NAME_MAIN));
            result = mainSourceSetRef.get();
        }
        return result;
View Full Code Here

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

        }
        return result;
    }

    public JavaSourceSet getTestSourceSet() {
        JavaSourceSet result = testSourceSetRef.get();
        if (result == null) {
            testSourceSetRef.set(findByNameOrEmpty(JavaSourceSet.NAME_TEST));
            result = testSourceSetRef.get();
        }
        return result;
View Full Code Here

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

            JavaSourcesModel actual) {

        Map<String, JavaSourceSet> expectedMap = sourceSetMap(expected);

        for (JavaSourceSet sourceSet: actual.getSourceSets()) {
            JavaSourceSet expectedSourceSet = expectedMap.get(sourceSet.getName());
            expectedMap.remove(sourceSet.getName());

            if (expectedSourceSet == null) {
                fail("Unexpected source set: " + sourceSet.getName());
            }
View Full Code Here

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

                }
            }
            return null;
        }
        else {
            JavaSourceSet bestMatch = null;
            for (JavaSourceSet sourceSet: sources.getSourceSets()) {
                String sourceSetName = sourceSet.getName().toLowerCase(Locale.ROOT);
                if (taskName.contains(sourceSetName)) {
                    if (bestMatch == null || bestMatch.getName().length() < sourceSetName.length()) {
                        bestMatch = sourceSet;
                    }
                }
            }
            return bestMatch;
View Full Code Here

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

            return bestMatch;
        }
    }

    private static File tryGetBuildDirSourceForJar(JarOutput jar, JavaSourcesModel sources) {
        JavaSourceSet result = tryGetSourceSetForJar(jar, sources);
        return result != null ? result.getOutputDirs().getClassesDir() : null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.