|
36 | 36 | import io.quarkus.deployment.builditem.*;
|
37 | 37 | import io.quarkus.deployment.builditem.nativeimage.ForceNonWeakReflectiveClassBuildItem;
|
38 | 38 | import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
|
| 39 | +import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem; |
39 | 40 | import io.quarkus.deployment.metrics.MetricsCapabilityBuildItem;
|
40 | 41 | import io.quarkus.gizmo.AssignableResultHandle;
|
41 | 42 | import io.quarkus.gizmo.MethodCreator;
|
@@ -261,6 +262,30 @@ void initializeRuntimeNamespacesFromBuildTimeValues(
|
261 | 262 |
|
262 | 263 | }
|
263 | 264 |
|
| 265 | + /** |
| 266 | + * Ignore warnings related to non-indexed classes in the reflective hierarchy. At this point, we cannot know |
| 267 | + * if they are actually needed for native compilation. |
| 268 | + * |
| 269 | + * This could probably be removed once https://github.com/quarkiverse/quarkus-operator-sdk/issues/941 is resolved. |
| 270 | + * |
| 271 | + */ |
| 272 | + @BuildStep |
| 273 | + void ignoreNonIndexedClassesWarningsInReflectiveHierarchy( |
| 274 | + BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> reflectiveHierarchyIgnoreWarningBuildItemBuildProducer) { |
| 275 | + reflectiveHierarchyIgnoreWarningBuildItemBuildProducer.produce( |
| 276 | + new ReflectiveHierarchyIgnoreWarningBuildItem(DotName.createSimple(io.vertx.core.Vertx.class.getName()))); |
| 277 | + reflectiveHierarchyIgnoreWarningBuildItemBuildProducer.produce( |
| 278 | + new ReflectiveHierarchyIgnoreWarningBuildItem( |
| 279 | + DotName.createSimple(io.vertx.core.http.HttpClient.class.getName()))); |
| 280 | + reflectiveHierarchyIgnoreWarningBuildItemBuildProducer.produce( |
| 281 | + new ReflectiveHierarchyIgnoreWarningBuildItem( |
| 282 | + DotName.createSimple(io.vertx.core.http.WebSocket.class.getName()))); |
| 283 | + reflectiveHierarchyIgnoreWarningBuildItemBuildProducer.produce( |
| 284 | + new ReflectiveHierarchyIgnoreWarningBuildItem( |
| 285 | + DotName.createSimple(io.vertx.core.net.ProxyType.class.getName()))); |
| 286 | + |
| 287 | + } |
| 288 | + |
264 | 289 | private void registerAssociatedClassesForReflection(BuildProducer<ReflectiveHierarchyBuildItem> reflectionClasses,
|
265 | 290 | BuildProducer<ForceNonWeakReflectiveClassBuildItem> forcedReflectionClasses,
|
266 | 291 | Set<String> classNamesToRegister) {
|
|
0 commit comments