Skip to content

Commit

Permalink
Workaround for #1193
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Oct 4, 2024
1 parent 047f61c commit 35dedbb
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,24 @@ private void handleLombokConfig(SourceSet sourceSet, TaskProvider<JavaCompile> c

TaskProvider<LombokConfig> lombokConfigTask = ConfigUtil.getLombokConfigTask(project, sourceSet);

// Workaround https://github.com/freefair/gradle-plugins/issues/1193
if (sourceSet.getName().equals("contractTest")) {
project.getTasks().configureEach(task -> {
if (task.getName().equals("generateContractTests")) {
lombokConfigTask.get().mustRunAfter(task);
}
});
}

// Workaround https://github.com/freefair/gradle-plugins/issues/1193
if (sourceSet.getName().equals("main")) {
project.getTasks().configureEach(task -> {
if (task.getName().equals("openApiGenerate")) {
lombokConfigTask.get().mustRunAfter(task);
}
});
}

compileTaskProvider.configure(javaCompile -> {
javaCompile.getInputs().file(lombokConfigTask.get().getOutputFile())
.withPropertyName("lombok.config")
Expand Down

0 comments on commit 35dedbb

Please sign in to comment.