Package org.gradle.util

Examples of org.gradle.util.VersionNumber


            major = toInt(defines.get("__GNUC__"));
            minor = toInt(defines.get("__GNUC_MINOR__"));
            patch = toInt(defines.get("__GNUC_PATCHLEVEL__"));
        }
        final ArchitectureInternal architecture = determineArchitecture(defines);
        return new DefaultGccVersionResult(new VersionNumber(major, minor, patch, null), architecture, clang);
    }
View Full Code Here


            visualCppDir = GFileUtils.canonicalise(visualCppDir);
            File visualStudioDir = visualCppDir.getParentFile();

            if (isVisualCpp(visualCppDir) && isVisualStudio(visualStudioDir)) {
                LOGGER.debug("Found Visual C++ {} at {}", valueName, visualCppDir);
                VersionNumber version = VersionNumber.parse(valueName);
                VisualCppInstall visualCpp = buildVisualCppInstall("Visual C++ " + valueName, visualStudioDir, visualCppDir, version);
                VisualStudioInstall visualStudio = new VisualStudioInstall(visualStudioDir, visualCpp);
                foundInstalls.put(visualStudioDir, visualStudio);
            } else {
                LOGGER.debug("Ignoring candidate Visual C++ directory {} as it does not look like a Visual C++ installation.", visualCppDir);
View Full Code Here

        return new SimpleWorkResult(true);
    }

    private void applyConfigurationScript(File configScript, CompilerConfiguration configuration) {
        VersionNumber version = parseGroovyVersion();
        if (version.compareTo(VersionNumber.parse("2.1")) < 0) {
            throw new GradleException("Using a Groovy compiler configuration script requires Groovy 2.1+ but found Groovy " + version + "");
        }
        Binding binding = new Binding();
        binding.setVariable("configuration", configuration);
View Full Code Here

    public FindBugsClasspathValidator(JavaVersion javaVersion) {
        this.javaVersion = javaVersion;
    }

    public void validateClasspath(Iterable<String> fileNamesOnClasspath) {
        VersionNumber v = getFindbugsVersion(fileNamesOnClasspath);
        boolean java6orLess = javaVersion.compareTo(JavaVersion.VERSION_1_7) < 0;
        boolean findbugs3orMore = v.getMajor() > 2;
        if (java6orLess && findbugs3orMore) {
            throw new FindBugsVersionTooHighException("The version of FindBugs (" + v + ") inferred from FindBugs classpath is too high to work with currently used Java version (" + javaVersion + ")."
                    + " Please use lower version of FindBugs or use newer version of Java. Inspected FindBugs classpath: " + fileNamesOnClasspath);
        }
        boolean java8orMore = javaVersion.compareTo(JavaVersion.VERSION_1_7) > 0;
        boolean findbugs2orLess = v.getMajor() < 3;
        if (java8orMore && findbugs2orLess) {
            throw new FindBugsVersionTooLowException("The version of FindBugs (" + v + ") inferred from FindBugs classpath is too low to work with currently used Java version (" + javaVersion + ")."
                    + " Please use higher version of FindBugs. Inspected FindBugs classpath: " + fileNamesOnClasspath);
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.util.VersionNumber

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.