diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java index c2860d18b4e6f..8d4451fe3dd8c 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java @@ -167,7 +167,7 @@ public void execute(Task test) { ConfigurationContainer configurations = project.getConfigurations(); // create a custom configuration for devmode - Configuration configuration = configurations.create(DEV_MODE_CONFIGURATION_NAME) + Configuration devModeConfiguration = configurations.create(DEV_MODE_CONFIGURATION_NAME) .extendsFrom(configurations.findByName(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME)); tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME, JavaCompile.class, @@ -197,12 +197,15 @@ public void execute(Task test) { task.dependsOn(classesTask, resourcesTask, testClassesTask, testResourcesTask, quarkusGenerateCodeDev, quarkusGenerateCodeTests); - task.setQuarkusDevConfiguration(configuration); + task.setQuarkusDevConfiguration(devModeConfiguration); }); quarkusRemoteDev.configure(task -> task.dependsOn(classesTask, resourcesTask)); - quarkusTest.configure(task -> task.dependsOn(classesTask, resourcesTask, testClassesTask, testResourcesTask, - quarkusGenerateCode, - quarkusGenerateCodeTests)); + quarkusTest.configure(task -> { + task.dependsOn(classesTask, resourcesTask, testClassesTask, testResourcesTask, + quarkusGenerateCode, + quarkusGenerateCodeTests); + task.setQuarkusDevConfiguration(devModeConfiguration); + }); quarkusBuild.configure( task -> task.dependsOn(classesTask, resourcesTask, tasks.named(JavaPlugin.JAR_TASK_NAME))); diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java index 88ebef62663c2..38c19e093c220 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java @@ -51,7 +51,7 @@ public class QuarkusDev extends QuarkusTask { public static final String IO_QUARKUS_DEVMODE_ARGS = "io.quarkus.devmode-args"; private Set filesIncludedInClasspath = new HashSet<>(); - private Configuration quarkusDevConfiguration; + protected Configuration quarkusDevConfiguration; private File buildDir;