Skip to content

Commit 88ede8c

Browse files
authored
Fix thirdpartyAudit check for graalvm runtime (#92635) (#92639)
fixes #92577
1 parent 3ed49cd commit 88ede8c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/BuildParams.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ public static Boolean isCi() {
114114
return value(isCi);
115115
}
116116

117+
public static Boolean isGraalVmRuntime() {
118+
return value(runtimeJavaDetails.toLowerCase().contains("graalvm"));
119+
}
120+
117121
public static Integer getDefaultParallel() {
118122
return value(defaultParallel);
119123
}

modules/repository-gcs/build.gradle

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,22 @@ tasks.named("thirdPartyAudit").configure {
180180
'org.apache.http.protocol.HttpContext',
181181
'org.apache.http.protocol.HttpProcessor',
182182
'org.apache.http.protocol.HttpRequestExecutor',
183-
// com.google.api.gax optional dependencies
184-
'org.graalvm.nativeimage.hosted.Feature',
185-
'org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess',
186-
'org.graalvm.nativeimage.hosted.Feature$DuringAnalysisAccess',
187-
'org.graalvm.nativeimage.hosted.Feature$FeatureAccess',
188-
'org.graalvm.nativeimage.hosted.RuntimeReflection',
183+
189184
// commons-logging provided dependencies
190185
'javax.servlet.ServletContextEvent',
191186
'javax.servlet.ServletContextListener'
192187
)
188+
189+
190+
if(BuildParams.graalVmRuntime == false) {
191+
ignoreMissingClasses(
192+
'org.graalvm.nativeimage.hosted.Feature',
193+
'org.graalvm.nativeimage.hosted.Feature$BeforeAnalysisAccess',
194+
'org.graalvm.nativeimage.hosted.Feature$DuringAnalysisAccess',
195+
'org.graalvm.nativeimage.hosted.Feature$FeatureAccess',
196+
'org.graalvm.nativeimage.hosted.RuntimeReflection'
197+
)
198+
}
193199
}
194200

195201
boolean useFixture = false

0 commit comments

Comments
 (0)