licensee icon indicating copy to clipboard operation
licensee copied to clipboard

Allow for group and module regex matching

Open PaulWoitaschek opened this issue 4 years ago • 2 comments

Due to weirdnesses with the maven publish plugin and same module names within nested gradle middle-modules, for our internal library the group name often times has a suffix:

I.e with a module structure like this:

featureA:presentation
featureA:data
featureB:presentation
featureB:data

We publish artifacts like:

my.company.library.featureA:presentation
my.company.library.featureA:data
my.company.library.featureB:presentation
my.company.library.featureB:data

It would be great if licensee allowed a regex matching so we can specify sth like:

ignoreDependenciesByRegex(my.company.*)

This could work similar to gradles exclusiveContent matching:

dependencyResolutionManagement {

  repositories {

    exclusiveContent {
      forRepository {
        maven {
          url 'https://maven.google.com'
        }
      }
      filter {
        includeGroupByRegex("androidx.*")
        includeGroupByRegex("com.android.tools.build.*")
        includeGroupByRegex("com.android.*")
        includeGroup("com.google.firebase")

PaulWoitaschek avatar Aug 17 '21 15:08 PaulWoitaschek

Makes sense to me!

JakeWharton avatar Aug 20 '21 03:08 JakeWharton

I believe

ignoreDependenciesByRegex("my.company.*")

should actually read

ignoreDependenciesByRegex("my\\.company(\\..*)?")

consp1racy avatar May 31 '22 14:05 consp1racy