Skip to content

Commit

Permalink
Make sure quarkusDev configuration is resolved before quarkusTest tas…
Browse files Browse the repository at this point in the history
…k runs
  • Loading branch information
glefloch committed Jan 5, 2022
1 parent 4e9dea2 commit 5e70a7c
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 5e70a7c

Please sign in to comment.