当前位置: 首页>>代码示例>>Java>>正文


Java JavaVersion.current方法代码示例

本文整理汇总了Java中org.gradle.api.JavaVersion.current方法的典型用法代码示例。如果您正苦于以下问题:Java JavaVersion.current方法的具体用法?Java JavaVersion.current怎么用?Java JavaVersion.current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.gradle.api.JavaVersion的用法示例。


在下文中一共展示了JavaVersion.current方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: assertUsingVersion

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public static void assertUsingVersion(String component, JavaVersion minVersion) throws UnsupportedJavaRuntimeException {
    JavaVersion current = JavaVersion.current();
    if (current.compareTo(minVersion) >= 0) {
        return;
    }
    throw new UnsupportedJavaRuntimeException(String.format("%s %s requires Java %s or later to run. You are currently using Java %s.", component, GradleVersion.current().getVersion(),
        minVersion.getMajorVersion(), current.getMajorVersion()));
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:UnsupportedJavaRuntimeException.java

示例2: DownloadingScalaToolChain

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public DownloadingScalaToolChain(File gradleUserHomeDir, File rootProjectDir, WorkerDaemonManager compilerDaemonManager, ConfigurationContainer configurationContainer, DependencyHandler dependencyHandler) {
    this.gradleUserHomeDir = gradleUserHomeDir;
    this.rootProjectDir = rootProjectDir;
    this.compilerDaemonManager = compilerDaemonManager;
    this.configurationContainer = configurationContainer;
    this.dependencyHandler = dependencyHandler;
    this.javaVersion = JavaVersion.current();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:DownloadingScalaToolChain.java

示例3: current

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public static JavaPlatform current() {
    return new DefaultJavaPlatform(JavaVersion.current());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultJavaPlatform.java

示例4: Jvm

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
/**
 * Constructs JVM details by inspecting the current JVM.
 */
Jvm(OperatingSystem os) {
    this(os, FileUtils.canonicalize(new File(System.getProperty("java.home"))), JavaVersion.current(), false);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:Jvm.java

示例5: DefaultJavaToolChain

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public DefaultJavaToolChain(JavaCompilerFactory compilerFactory, ExecActionFactory execActionFactory) {
    this.compilerFactory = compilerFactory;
    this.execActionFactory = execActionFactory;
    this.javaVersion = JavaVersion.current();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:6,代码来源:DefaultJavaToolChain.java

示例6: TarTaskOutputPacker

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public TarTaskOutputPacker(FileSystem fileSystem) {
    this.directoryWalkerFactory = new DefaultDirectoryWalkerFactory(JavaVersion.current(), fileSystem);
    this.fileSystem = fileSystem;
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:TarTaskOutputPacker.java

示例7: DefaultDirectoryWalkerFactory

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
DefaultDirectoryWalkerFactory() {
    this(JavaVersion.current(), FileSystems.getDefault());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DefaultDirectoryWalkerFactory.java

示例8: getJavaPlatform

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
private JavaPlatform getJavaPlatform(String preferredJavaVersion) {
    if (preferredJavaVersion != null) {
        return new DefaultJavaPlatform(JavaVersion.toVersion(preferredJavaVersion));
    }
    return new DefaultJavaPlatform(JavaVersion.current());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:PlayPlatformResolver.java

示例9: getSourceCompatibility

import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
/**
 * Returns the source compatibility used for compiling Java sources.
 */
public JavaVersion getSourceCompatibility() {
    return srcCompat != null ? srcCompat : JavaVersion.current();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:JavaPluginConvention.java


注:本文中的org.gradle.api.JavaVersion.current方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。