Skip to content

Commit

Permalink
Improve build-cache support
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Aug 19, 2024
1 parent 08494cb commit 48d2723
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.gradle.api.DefaultTask;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.FileSystemOperations;
import org.gradle.api.file.ProjectLayout;
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.internal.file.FileOperations;
import org.gradle.api.provider.ListProperty;
Expand Down Expand Up @@ -45,7 +46,7 @@ public abstract class LombokConfig extends DefaultTask implements LombokTask {
protected abstract FileSystemOperations getFileSystemOperations();

@Inject
protected abstract FileOperations getFileOperations();
protected abstract ProjectLayout getProjectLayout();

@Inject
protected abstract ExecOperations getExecOperations();
Expand Down Expand Up @@ -85,7 +86,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 @@ -103,14 +105,6 @@ public LombokConfig() {
getOutputs().doNotCacheIf("Config Imports were used", t -> ((LombokConfig) t).getConfigFiles() == null);
}

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

@InputFiles
@Optional
@Nullable
Expand Down

0 comments on commit 48d2723

Please sign in to comment.