Filtering files in a dependency as part of a plugin

I’ve got a plugin that provides a workflow for my enterprise to work with Apache Avro and it’s got a number of users. Basically what it does is put some process around generating Avro AVSC files as input into a Confluent Schema Registry(and as input for code generation for related applications).

While I have a number of users, not all teams are users and some are publishing “dirty” zipfile-based artifacts. I’d like to provide a nice API for my users to exclude unwanted files from being pulled in from these artifacts(perhaps by exposing the contents of each artifact as a Filetree or PatternFilterable where things could be included/excluded).

In a custom plugin, is it possible to do something like this or at least in this spirit?

dependencies {

customConfiguration('com.fakeco:fakeZipFile:2.0'){
    patternFilterable -> patternFilterable.include("**/*.avsc") }

customConfiguration('com.fakeco:anotherFakeZipFile:1.5'){
    patternFilterable -> patternFilterable.include("**/*.avsc").exclude("test/*") }

//this one doesn't require any filtering
customConfiguration('com.fakeco:properlyFormattedZipFile:1.9')

}

I only want to apply this to my custom configuration.

When I look at things like artifact transforms, it seems like that may be what I need to do but I don’t follow how TransformParameters works. Is this a viable path to implement something like this?

Perhaps there is a way to intercept the DependencyFactory in the (Default)DependencyHandler?

Thank you
Michael Kohout