diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java index c95b37cbd1302..5afe466d5054a 100644 --- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java +++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java @@ -928,7 +928,7 @@ public Object apply(EvalContext ctx) { String ctxName = ctx.getName(); List sourcesDir = DevConsoleManager.getHotReplacementContext().getSourcesDir(); - if (ctxName.equals("sourcePackages")) { + if (ctxName.endsWith("sourcePackages")) { if (disable) { return Collections.emptyList(); // we need this here because the result needs to be iterable } @@ -938,12 +938,15 @@ public Object apply(EvalContext ctx) { String lang = sourcePaths.getFileName().toString(); List packages = sourcePackagesForRoot(sourcePaths); if (!packages.isEmpty()) { - sourcePackagesByLang.put(lang, packages); + // The `replace` is used to avoid invalid JavaScript identifier (using `-`) + // It happens when using Gradle and extensions generating code (Avro, gRPC...) + // See https://github.com/quarkusio/quarkus/issues/30288. + sourcePackagesByLang.put(lang.replace("-", "_"), packages); } } return sourcePackagesByLang; } - if (ctxName.equals("locationPackages")) { + if (ctxName.endsWith("locationPackages")) { if (disable) { return Collections.emptyList(); // we need this here because the result needs to be iterable }