Update Error Prone -XepExcludedPaths flag to be Windows-compatible (#927)

Prior to these changes the provided pattern would never match on
Windows, as Error Prone matches against file URIs, which in practice
will always contain forward slashes, even on Windows.
This commit is contained in:
Stephan Schroevers
2023-12-24 18:52:42 +01:00
committed by GitHub
parent 1650b6b00d
commit 0109632b70

View File

@@ -1741,7 +1741,13 @@
avoid that, so we simply tell Error Prone
not to warn about generated code. -->
-XepDisableWarningsInGeneratedCode
-XepExcludedPaths:\Q${project.build.directory}${file.separator}\E.*
<!-- XXX: Ideally we'd match against
`\Q${project.build.directory}${file.separator}\E.*`,
but that approach doesn't work on Windows,
as Error Prone matches against a path that
always contains forward-slash path
separators. -->
-XepExcludedPaths:(?!.*/src/[^/]+/java/.*).*
<!-- We don't target Android. -->
-Xep:AndroidJdkLibsChecker:OFF
<!-- XXX: Enable this once we open-source