Package org.gradle.api.artifacts.repositories

## Interface RepositoryContentDescriptor

- All Superinterfaces:
    `InclusiveRepositoryContentDescriptor`
  All Known Subinterfaces:
    `MavenRepositoryContentDescriptor`

      public interface RepositoryContentDescriptor
      extends InclusiveRepositoryContentDescriptor

  Descriptor of a repository content, used to avoid reaching to an external repository when not needed.

  Excludes are applied after includes. This means that by default, everything is included and nothing excluded. If includes are added, then if the module doesn't match any of the includes, it's excluded. Then if it does, but it also matches one of the excludes, it's also excluded.

  Since:
    5.1

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `excludeGroup​(java.lang.String group)` | Declares that an entire group shouldn't be searched for in this repository.
    `void` | `excludeGroupByRegex​(java.lang.String groupRegex)` | Declares that an entire group shouldn't be searched for in this repository.
    `void` | `excludeModule​(java.lang.String group, java.lang.String moduleName)` | Declares that an entire module shouldn't be searched for in this repository.
    `void` | `excludeModuleByRegex​(java.lang.String groupRegex, java.lang.String moduleNameRegex)` | Declares that an entire module shouldn't be searched for in this repository, using regular expressions.
    `void` | `excludeVersion​(java.lang.String group, java.lang.String moduleName, java.lang.String version)` | Declares that a specific module version shouldn't be searched for in this repository.
    `void` | `excludeVersionByRegex​(java.lang.String groupRegex, java.lang.String moduleNameRegex, java.lang.String versionRegex)` | Declares that a specific module version shouldn't be searched for in this repository, using regular expressions.
    `void` | `includeGroup​(java.lang.String group)` | Declares that an entire group should be searched for in this repository.
    `void` | `includeGroupByRegex​(java.lang.String groupRegex)` | Declares that an entire group should be searched for in this repository.
    `void` | `includeModule​(java.lang.String group, java.lang.String moduleName)` | Declares that an entire module should be searched for in this repository.
    `void` | `includeModuleByRegex​(java.lang.String groupRegex, java.lang.String moduleNameRegex)` | Declares that an entire module should be searched for in this repository, using regular expressions.
    `void` | `includeVersion​(java.lang.String group, java.lang.String moduleName, java.lang.String version)` | Declares that a specific module version should be searched for in this repository.
    `void` | `includeVersionByRegex​(java.lang.String groupRegex, java.lang.String moduleNameRegex, java.lang.String versionRegex)` | Declares that a specific module version should be searched for in this repository, using regular expressions.
    `void` | `notForConfigurations​(java.lang.String... configurationNames)` | Declares that this repository should not be used for a specific set of configurations.
    `<T> void` | `onlyForAttribute​(Attribute<T> attribute, T... validValues)` | Declares that this repository will only be searched if the consumer requires a specific attribute.
    `void` | `onlyForConfigurations​(java.lang.String... configurationNames)` | Declares that this repository should only be used for a specific set of configurations.

- - ### Method Detail

    - #### includeGroup

          void includeGroup​(java.lang.String group)

      Declares that an entire group should be searched for in this repository.
      Specified by:
        `includeGroup` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `group` - the group name

    - #### includeGroupByRegex

          void includeGroupByRegex​(java.lang.String groupRegex)

      Declares that an entire group should be searched for in this repository.
      Specified by:
        `includeGroupByRegex` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `groupRegex` - a regular expression of the group name

    - #### includeModule

          void includeModule​(java.lang.String group,
                             java.lang.String moduleName)

      Declares that an entire module should be searched for in this repository.
      Specified by:
        `includeModule` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `group` - the group name
        `moduleName` - the module name

    - #### includeModuleByRegex

          void includeModuleByRegex​(java.lang.String groupRegex,
                                    java.lang.String moduleNameRegex)

      Declares that an entire module should be searched for in this repository, using regular expressions.
      Specified by:
        `includeModuleByRegex` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `groupRegex` - the group name regular expression
        `moduleNameRegex` - the module name regular expression

    - #### includeVersion

          void includeVersion​(java.lang.String group,
                              java.lang.String moduleName,
                              java.lang.String version)

      Declares that a specific module version should be searched for in this repository.

      The version notation supports range notations like `[1.0,2.0[`.

      Specified by:
        `includeVersion` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `group` - the group name
        `moduleName` - the module name
        `version` - the module version

    - #### includeVersionByRegex

          void includeVersionByRegex​(java.lang.String groupRegex,
                                     java.lang.String moduleNameRegex,
                                     java.lang.String versionRegex)

      Declares that a specific module version should be searched for in this repository, using regular expressions.

      The version notation for a regex will be matched against a single version and does not support range notations.

      Specified by:
        `includeVersionByRegex` in interface `InclusiveRepositoryContentDescriptor`
      Parameters:
        `groupRegex` - the group name regular expression
        `moduleNameRegex` - the module name regular expression
        `versionRegex` - the module version regular expression

    - #### excludeGroup

          void excludeGroup​(java.lang.String group)

      Declares that an entire group shouldn't be searched for in this repository.
      Parameters:
        `group` - the group name

    - #### excludeGroupByRegex

          void excludeGroupByRegex​(java.lang.String groupRegex)

      Declares that an entire group shouldn't be searched for in this repository.
      Parameters:
        `groupRegex` - the group name regular expression

    - #### excludeModule

          void excludeModule​(java.lang.String group,
                             java.lang.String moduleName)

      Declares that an entire module shouldn't be searched for in this repository.
      Parameters:
        `group` - the group name
        `moduleName` - the module name

    - #### excludeModuleByRegex

          void excludeModuleByRegex​(java.lang.String groupRegex,
                                    java.lang.String moduleNameRegex)

      Declares that an entire module shouldn't be searched for in this repository, using regular expressions.
      Parameters:
        `groupRegex` - the group name regular expression
        `moduleNameRegex` - the module name regular expression

    - #### excludeVersion

          void excludeVersion​(java.lang.String group,
                              java.lang.String moduleName,
                              java.lang.String version)

      Declares that a specific module version shouldn't be searched for in this repository.

      The version notation for a regex will be matched against a single version and does not support range notations.

      Parameters:
        `group` - the group name
        `moduleName` - the module name
        `version` - the module version

    - #### excludeVersionByRegex

          void excludeVersionByRegex​(java.lang.String groupRegex,
                                     java.lang.String moduleNameRegex,
                                     java.lang.String versionRegex)

      Declares that a specific module version shouldn't be searched for in this repository, using regular expressions.

      The version notation for a regex will be matched against a single version and does not support range notations.

      Parameters:
        `groupRegex` - the group name
        `moduleNameRegex` - the module name
        `versionRegex` - the module version

    - #### onlyForConfigurations

          void onlyForConfigurations​(java.lang.String... configurationNames)

      Declares that this repository should only be used for a specific set of configurations. Defaults to any configuration
      Parameters:
        `configurationNames` - the names of the configurations the repository will be used for

    - #### notForConfigurations

          void notForConfigurations​(java.lang.String... configurationNames)

      Declares that this repository should not be used for a specific set of configurations. Defaults to any configuration
      Parameters:
        `configurationNames` - the names of the configurations the repository will not be used for

    - #### onlyForAttribute

          <T> void onlyForAttribute​(Attribute<T> attribute,
                                    T... validValues)

      Declares that this repository will only be searched if the consumer requires a specific attribute.
      Type Parameters:
        `T` - the type of the attribute
      Parameters:
        `attribute` - the attribute
        `validValues` - the list of accepted values