Package org.gradle.api.plugins

## Interface FeatureSpec

-     public interface FeatureSpec

  Handler for configuring features, which may contribute additional configurations, publications, dependencies, ...
  Since:
    5.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `capability​(String group, String name, String version)` | Declares a capability of this feature.
    `void` | `disablePublication()` | By default, features are published on external repositories.
    `void` | `usingSourceSet​(SourceSet sourceSet)` | Declares the source set which this feature is built from.
    `void` | `withJavadocJar()` | Automatically package Javadoc and register the produced JAR as a variant.
    `void` | `withSourcesJar()` | Automatically package sources from the linked `SourceSet` and register the produced JAR as a variant.

- - ### Method Detail

    - #### usingSourceSet

          void usingSourceSet​(SourceSet sourceSet)

      Declares the source set which this feature is built from.
      Parameters:
        `sourceSet` - the source set

    - #### capability

          void capability​(String group,
                          String name,
                          String version)

      Declares a capability of this feature. By default, a capability corresponding to the "group", "name" + feature name will be created. For example, if the group of the component is "org", that the project name is "lib" and that the feature name is "myFeature", then a capability named "org:lib-my-feature" is automatically added. Calling this method override the default and register additional capabilities.
      Parameters:
        `group` - the group of the capability
        `name` - the name of the capability
        `version` - the version of the capability

    - #### withJavadocJar

          @Incubating
          void withJavadocJar()

      Automatically package Javadoc and register the produced JAR as a variant. See also `JavaPluginExtension.withJavadocJar()`.
      Since:
        6.0

    - #### withSourcesJar

          @Incubating
          void withSourcesJar()

      Automatically package sources from the linked `SourceSet` and register the produced JAR as a variant. See also `JavaPluginExtension.withSourcesJar()` ()}.
      Since:
        6.0

    - #### disablePublication

          @Incubating
          void disablePublication()

      By default, features are published on external repositories. Calling this method allows disabling publishing.
      Since:
        6.7