本文整理汇总了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()));
}
示例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();
}
示例3: current
import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public static JavaPlatform current() {
return new DefaultJavaPlatform(JavaVersion.current());
}
示例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);
}
示例5: DefaultJavaToolChain
import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public DefaultJavaToolChain(JavaCompilerFactory compilerFactory, ExecActionFactory execActionFactory) {
this.compilerFactory = compilerFactory;
this.execActionFactory = execActionFactory;
this.javaVersion = JavaVersion.current();
}
示例6: TarTaskOutputPacker
import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
public TarTaskOutputPacker(FileSystem fileSystem) {
this.directoryWalkerFactory = new DefaultDirectoryWalkerFactory(JavaVersion.current(), fileSystem);
this.fileSystem = fileSystem;
}
示例7: DefaultDirectoryWalkerFactory
import org.gradle.api.JavaVersion; //导入方法依赖的package包/类
DefaultDirectoryWalkerFactory() {
this(JavaVersion.current(), FileSystems.getDefault());
}
示例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());
}
示例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();
}