diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/info/BuildParams.java b/buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/info/BuildParams.java similarity index 97% rename from buildSrc/src/main/java/org/elasticsearch/gradle/info/BuildParams.java rename to buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/info/BuildParams.java index 2cb5204b8b4..9fba20c7db7 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/info/BuildParams.java +++ b/buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/info/BuildParams.java @@ -84,7 +84,6 @@ public class BuildParams { return value(runtimeJavaVersion); } - @ExecutionTime public static Boolean isInFipsJvm() { return value(inFipsJvm); } @@ -155,6 +154,8 @@ public class BuildParams { .filter(f -> Modifier.isStatic(f.getModifiers())) .forEach(f -> { try { + // Since we are mutating private static fields from a public static inner class we need to suppress + // accessibility controls here. f.setAccessible(true); f.set(null, null); } catch (IllegalAccessException e) { diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/info/JavaHome.java b/buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/info/JavaHome.java similarity index 100% rename from buildSrc/src/main/java/org/elasticsearch/gradle/info/JavaHome.java rename to buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/info/JavaHome.java