Add runtimeJavaDetails property in BuildParams (#61901) (#61961)

Relates to #61857
This commit is contained in:
Ioannis Kakavas 2020-09-04 11:47:44 +03:00 committed by GitHub
parent cdfb163c7c
commit 6d250e0f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,7 @@ public class BuildParams {
private static JavaVersion minimumRuntimeVersion;
private static JavaVersion gradleJavaVersion;
private static JavaVersion runtimeJavaVersion;
private static String runtimeJavaDetails;
private static Boolean inFipsJvm;
private static String gitRevision;
private static String gitOrigin;
@ -89,6 +90,10 @@ public class BuildParams {
return value(runtimeJavaVersion);
}
public static String getRuntimeJavaDetails() {
return value(runtimeJavaDetails);
}
public static Boolean isInFipsJvm() {
return value(inFipsJvm);
}
@ -198,6 +203,10 @@ public class BuildParams {
BuildParams.runtimeJavaVersion = requireNonNull(runtimeJavaVersion);
}
public void setRuntimeJavaDetails(String runtimeJavaDetails) {
BuildParams.runtimeJavaDetails = runtimeJavaDetails;
}
public void setInFipsJvm(boolean inFipsJvm) {
BuildParams.inFipsJvm = inFipsJvm;
}

View File

@ -105,6 +105,7 @@ public class GlobalBuildInfoPlugin implements Plugin<Project> {
params.setRuntimeJavaHome(runtimeJavaHome);
params.setRuntimeJavaVersion(determineJavaVersion("runtime java.home", runtimeJavaHome, minimumRuntimeVersion));
params.setIsRutimeJavaHomeSet(Jvm.current().getJavaHome().equals(runtimeJavaHome) == false);
params.setRuntimeJavaDetails(getJavaInstallation(runtimeJavaHome).getImplementationName());
params.setJavaVersions(getAvailableJavaVersions(minimumCompilerVersion));
params.setMinimumCompilerVersion(minimumCompilerVersion);
params.setMinimumRuntimeVersion(minimumRuntimeVersion);