David Rawson
12/20/2024, 3:49 AMexclusiveContent
for a group but only if the version doesn't end in " `-SNAPSHOT`". This is because:
1. I need to prevent requests for my company's private artefacts going to public maven repos and I've got a number of repos which makes `include`/`exclude` a bit tedious.
2. The reason for excluding -SNAPSHOT
is that my team still likes to use maven local 😠so they don't want the requests for private SNAPSHOT artefacts to go through to the server.
I've tried a number of things like:
exclusiveContent {
forRepository {
// My special repository for the company com.example
}
filter {
includeVersionByRegex("com.example.*", ".*", "^(?!.*-SNAPSHOT\$)")
}
}
but I can't seem to get the result I want. I'm guessing that what I am trying to do is impossible using the exclusiveContent
API. Would that be right?
Links:
https://docs.gradle.org/current/userguide/filtering_repository_content.htmlVampire
12/20/2024, 8:38 AM