Skip to content

Commit

Permalink
Fix data gen folder not being added to resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Dec 9, 2023
1 parent 7106441 commit d9a436c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
import java.io.UncheckedIOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.inject.Inject;
import javax.xml.parsers.DocumentBuilder;
Expand Down Expand Up @@ -117,7 +119,9 @@ public void configureDataGeneration(Action<DataGenerationSettings> action) {
if (settings.getAddToResources().get()) {
mainSourceSet.resources(files -> {
// Add the src/main/generated to the main sourceset's resources.
files.getSrcDirs().add(outputDirectory);
Set<File> srcDirs = new HashSet<>(files.getSrcDirs());
srcDirs.add(outputDirectory);
files.setSrcDirs(srcDirs);
});
}

Expand Down

0 comments on commit d9a436c

Please sign in to comment.