Skip to content

Instantly share code, notes, and snippets.

@qinyu
Created November 23, 2016 23:22
Show Gist options
  • Save qinyu/0d655a11f7a8fe2fdfff93498f4aedfb to your computer and use it in GitHub Desktop.
Save qinyu/0d655a11f7a8fe2fdfff93498f4aedfb to your computer and use it in GitHub Desktop.
使用依赖的dynamic version时忽略snapshot
configurations.all { configuration ->
configuration.resolutionStrategy { ResolutionStrategy componentSelection ->
componentSelection.componentSelection { rules ->
rules.all { ComponentSelection selection, ComponentMetadata metadata ->
boolean accepted = metadata.status == 'release'
if (!accepted) {
selection.reject("Component status ${metadata.status} rejected by release")
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment