Skip to content

Commit

Permalink
Merge pull request #22667 from glefloch/fix/22663
Browse files Browse the repository at this point in the history
Make sure quarkusDev configuration is resolved before quarkusTest task runs
  • Loading branch information
aloubyansky authored Jan 6, 2022
2 parents b8464e8 + 5e70a7c commit aff95a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class QuarkusDev extends QuarkusTask {

public static final String IO_QUARKUS_DEVMODE_ARGS = "io.quarkus.devmode-args";
private Set<File> filesIncludedInClasspath = new HashSet<>();
private Configuration quarkusDevConfiguration;
protected Configuration quarkusDevConfiguration;

private File buildDir;

Expand Down

0 comments on commit aff95a1

Please sign in to comment.