Skip to content

Commit

Permalink
Muzzle exclude dep from extras
Browse files Browse the repository at this point in the history
  • Loading branch information
amarziali committed Nov 28, 2024
1 parent 50b9acd commit c5ee702
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions buildSrc/src/main/groovy/MuzzlePlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,12 @@ class MuzzlePlugin implements Plugin<Project> {
config.dependencies.add(dep)
}
for (String additionalDependency : muzzleDirective.additionalDependencies) {
config.dependencies.add(instrumentationProject.dependencies.create(additionalDependency) {
transitive = true
config.dependencies.add(instrumentationProject.dependencies.create(additionalDependency) { dep ->
for (String excluded : muzzleDirective.excludedDependencies) {
String[] parts = excluded.split(':')
dep.exclude group: parts[0], module: parts[1]
}
dep.transitive = true
})
}

Expand Down

0 comments on commit c5ee702

Please sign in to comment.