如何在Gradle中为一组类似的命名依赖项简明地指定依赖项排除

如何在Gradle中为一组类似的命名依赖项简明地指定依赖项排除,gradle,gradle-dependencies,Gradle,Gradle Dependencies,我认为在Gradle构建脚本中通过通配符模式进行某种模式匹配来构造一组依赖排除是很好的。基本上,我认为应该支持的是 someConfiguration('someGroup:someArtifact:someVersion') { exclude group: 'org.opensaml', module: 'opensaml*' // <-- Note the wildcard. } someConfiguration('someGroup:someArtifact:someVe

我认为在Gradle构建脚本中通过通配符模式进行某种模式匹配来构造一组依赖排除是很好的。基本上,我认为应该支持的是

someConfiguration('someGroup:someArtifact:someVersion') {
   exclude group: 'org.opensaml', module: 'opensaml*' // <-- Note the wildcard.
}
someConfiguration('someGroup:someArtifact:someVersion')){

排除组:'org.opensaml',模块:'opensaml*'//您根本不必定义
模块
。只需
排除组:'org.opensaml'
,所有(或至少大部分)
opensaml
依赖项都将被排除。