Skip to content

Commit

Permalink
Merge pull request #1140 from tylerbertrand/caching-updates
Browse files Browse the repository at this point in the history
Fix Caching Issues in Lombok Plugin
  • Loading branch information
larsgrefer authored Aug 19, 2024
2 parents 03f6210 + b78c34e commit 41868e0
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public abstract class LombokConfig extends DefaultTask implements LombokTask {
/**
* Paths to java files or directories the configuration is to be printed for.
*/
@Internal
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
public abstract ConfigurableFileCollection getPaths();

@OutputFile
Expand All @@ -99,18 +100,10 @@ public LombokConfig() {
getOutputs().doNotCacheIf("Config Imports were used", t -> ((LombokConfig) t).getConfigFiles() == null);
}

@Input
protected List<String> getInputPaths() {
return getPaths().getFiles()
.stream()
.map(File::getPath)
.collect(Collectors.toList());
}

@InputFiles
@Optional
@Nullable
@PathSensitive(PathSensitivity.ABSOLUTE)
@PathSensitive(PathSensitivity.RELATIVE)
@SneakyThrows
protected Set<File> getConfigFiles() {
if (getPaths().isEmpty()) {
Expand Down

0 comments on commit 41868e0

Please sign in to comment.