getCredentials

open override fun <T : Credentials> getCredentials(credentialsType: Class<T>): T

Retrieves the credentials of the specified type for the repository.

Return

An instance of the requested credentials type.

Parameters

T

The type of credentials to retrieve, which must be a subclass of Credentials.

credentialsType

The class of the credentials type to retrieve.

Throws

GradleException

If the credentials are missing or if they cannot be cast to the specified type.