api / org.gradle.api.artifacts.component / LibraryComponentSelector

LibraryComponentSelector

@Incubating interface LibraryComponentSelector : ComponentSelector

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

Functions

getLibraryName

abstract fun getLibraryName(): String

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.

getProjectPath

abstract fun getProjectPath(): String

Return the project path of the selected library.

getVariant

abstract fun getVariant(): String

Inherited Functions

getAttributes

abstract fun getAttributes(): AttributeContainer

The attributes of the module to select the component from. The attributes only include selector specific attributes. This means it typically doesn't include any consumer specific attribute.

getDisplayName

abstract fun getDisplayName(): String

Returns a human-consumable display name for this selector.

matchesStrictly

abstract fun matchesStrictly(identifier: ComponentIdentifier): Boolean

Checks if selector matches component identifier.