What are common methods to filter dependencies in a configuration?

Gradle’s API for working with configuration dependencies is not very flexible. Instead of creating multiple configurations is there an API to modify a single configuration. For example, assuming

configurations.compile
  • Method to select only parent dependencies (i.e. exclude transitive) * Method to select only transitive dependencies (i.e. exclude parents) * Method to filter configuration by string match or negative match

++ Another item that is missing is a way to define a configuration project or maven dependency with only transitive libs.