Skip to content

Commit

Permalink
Don't cache when applying errorprone / refaster rules (#696)
Browse files Browse the repository at this point in the history
No longer cache javaCompile tasks when applying errorprone or refaster checks.
  • Loading branch information
dansanduleac authored and bulldozer-bot[bot] committed Jul 17, 2019
1 parent ce456dd commit cca1b5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-696.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
fix:
description: No longer cache javaCompile tasks when applying errorprone or refaster
checks.
links:
- https://github.com/palantir/gradle-baseline/pull/696
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public void apply(Project project) {
errorProneOptions.getErrorproneArgumentProviders().add(() -> ImmutableList.of(
"-XepPatchChecks:refaster:" + refasterRulesFile.get().getAbsolutePath(),
"-XepPatchLocation:IN_PLACE"));
// Don't attempt to cache since it won't capture the source files that might be modified
javaCompile.getOutputs().cacheIf(t -> false);
} else if (project.hasProperty(PROP_ERROR_PRONE_APPLY)) {
javaCompile.getOptions().setWarnings(false);
// TODO(gatesn): Is there a way to discover error-prone checks?
Expand All @@ -123,6 +125,8 @@ public void apply(Project project) {
"-XepPatchChecks:" + Joiner.on(',')
.join(errorProneExtension.getPatchChecks().get()),
"-XepPatchLocation:IN_PLACE"));
// Don't attempt to cache since it won't capture the source files that might be modified
javaCompile.getOutputs().cacheIf(t -> false);
}
});
});
Expand Down

0 comments on commit cca1b5e

Please sign in to comment.