Skip to content

Commit

Permalink
Clean output directory before extracting protos
Browse files Browse the repository at this point in the history
If the dependencies change, the old dependency's proto files can be left
around. That is broken and causes confusion. This was noticed in #731
when a `gradle clean` was needed.
  • Loading branch information
ejona86 committed Sep 5, 2023
1 parent ff4fe68 commit 1dfc62d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ abstract class ProtobufExtract extends DefaultTask {

@TaskAction
public void extract() {
copyActionFacade.delete { spec ->
spec.delete(destDir)
}
copyActionFacade.copy { spec ->
spec.includeEmptyDirs = false
spec.from(inputProtoFiles)
Expand Down

0 comments on commit 1dfc62d

Please sign in to comment.