public class CredentialsPlugin extends java.lang.Object
Plugin to store and access encrypted credentials using password-based encryption (PBE). The credentials are stored in the Gradle home directory in a separate file for each passphrase. If no passphrase is provided, a default passphrase is used and the credentials are stored in the default credentials file 'gradle.encrypted.properties'. While running a build, only one passphrase is active per project.
The plugin provides a credentials container through the 'credentials' property that is available from the Gradle project. This allows access to credentials in the form of
project.myCredentialKey. The already persisted credentials can be accessed through the credentials container, and new credentials can be added to the container
ad-hoc while the build is executed. Credentials added ad-hoc are not available beyond the lifetime of the build.
The plugin adds a task to add credentials and a task to remove credentials.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
ADD_CREDENTIALS_TASK_NAME |
|
static java.lang.String |
CREDENTIALS_CONTAINER_PROPERTY |
|
static java.lang.String |
CREDENTIALS_KEY_PROPERTY |
|
static java.lang.String |
CREDENTIALS_LOCATION_PROPERTY |
|
static java.lang.String |
CREDENTIALS_PASSPHRASE_PROPERTY |
|
static java.lang.String |
CREDENTIALS_VALUE_PROPERTY |
|
static java.lang.String |
DEFAULT_PASSPHRASE |
|
static java.lang.String |
DEFAULT_PASSPHRASE_CREDENTIALS_FILE |
|
static java.lang.String |
REMOVE_CREDENTIALS_TASK_NAME |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
apply(org.gradle.api.Project project) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |