Skip to content

Commit

Permalink
Muzzle exclude dep from extras (#8035)
Browse files Browse the repository at this point in the history
  • Loading branch information
amarziali authored Nov 28, 2024
1 parent 7f91a3e commit d949e28
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 d949e28

Please sign in to comment.