Package: org.gradle.api.artifacts.component

## [Java] Interface LibraryComponentSelector

- org.gradle.api.artifacts.component.LibraryComponentSelector

- All Superinterfaces:
    ComponentSelector

  Criteria for selecting a library instance that is built as part of the current build.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `String` | `getLibraryName()` Return the library name of the selected library.
    `String` | `getProjectPath()` Return the project path of the selected library.
    `String` | `getVariant()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface ComponentSelector` | `getDisplayName, matchesStrictly`

- - ### Method Detail

    - #### @Nullable public String getLibraryName()

      Return the library name of the selected library. If the library name is null then it is expected to find a single library defined in same project as the requesting component or dependency resolution will fail. If not `null` then the name will never be empty.

      Returns:
        the library name

    - #### public String getProjectPath()

      Return the project path of the selected library.

      Returns:
        the project path of the library

    - #### @Nullable public String getVariant()