A combination of transitive dependencies is ending...
# dependency-management
r
A combination of transitive dependencies is ending up with gradle trying to choose an artifact selector that doesn't exist, so I want to remove it. I've found
withoutArtifactSelectors()
but I can't find an example of how to use it. This doesn't work:
Copy code
configurations.all {
    resolutionStrategy {
        dependencySubstitution {
            substitute module('org.yaml:snakeyaml') withoutArtifactSelectors()
        }
    }
}
I've ended up with this, which feels hacky:
Copy code
configurations.all {
  resolutionStrategy.eachDependency { details ->
    if (details.requested.module.toString() == 'org.yaml:snakeyaml') {
      details.artifactSelection {
        it.selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
      }
    }
  }
}