I want to add an exclusiveContent block (i.e. cont...
# community-support
c
I want to add an exclusiveContent block (i.e. content filtering) to my repository declarations in settings.gradle.kts my issue is that I have a private maven repo declaration and a private maven snapshot repo. my snapshot artifacts keep checking my "regular" maven repo (non snapshot). whats the best way to do that. claude keeps writing extravagent regexs across multiple rules. surely this sort of snapshot vs non-snapshot is a common use case?
t
c
that seems better than a regex. lemme see if i can get that to work lol
hm. did not seem to work. had to do includeVersionByRegex and put in a regex in the version arg that looks for SNAPSHOT and !SNAPSHOT
m
Put your configuration here. It 'should' work with '*Only()'...
👍 1
c
I have my repository setup as
Copy code
exclusiveContent {
  forRepository {
    maven {
    credentials {}...
    url = ...
    mavenContent { releasesOnly() }
    }
  }
  filter {
  includeGroupByRegex("com.blah.*")
  }
}
so the above ^ does not work instead what works is
Copy code
exclusiveContent {
  forRepository {
    maven {
    credentials {}...
    url = ...
    }
  }
  filter {
  includeVersionByRegex("com\\.blah(\\..*)?", ".*", "^(?!.*SNAPSHOT).*$")
  }
}
🤔 1
so basically i have a very ugly !SNAPSHOT regex. instead id love to use releasesOnly()
m
Looks perfectly fine... Are you sure, your don't have this repo defined also for regular (not 'blah') artifacts?
c
was on PTO and moved away from this issue. but i will give it another shot in the future.
👍 1