Skip to content

Instantly share code, notes, and snippets.

@ivarkol
Created May 24, 2024 06:46
Show Gist options
  • Save ivarkol/e9dd6fa9cfd5a5847f1837797a651d7e to your computer and use it in GitHub Desktop.
Save ivarkol/e9dd6fa9cfd5a5847f1837797a651d7e to your computer and use it in GitHub Desktop.
Gradle FileTree exclude
def pattern = Pattern.compile("ru/home/generated/${opt.specService}/(?:rest|configuration)/(\\w*)/?.*")
exclude { tree ->
def matcher = pattern.matcher(tree.path)
matcher.matches() ? matcher.group(1) != opt.apiType : false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment