public String getCredentialsKey() { return key != null ? key : getProjectProperty(CredentialsPlugin.CREDENTIALS_KEY_PROPERTY); }
removeCredentials.setDescription("Removes the credentials specified through the project property 'credentialsKey'."); removeCredentials.setGroup("Credentials"); removeCredentials.setCredentialsPersistenceManager(credentialsPersistenceManager); removeCredentials.getOutputs().upToDateWhen(AlwaysFalseSpec.INSTANCE); LOGGER.debug(String.format("Registered task '%s'", removeCredentials.getName()));
@TaskAction void removeCredentials() { // get credentials key from the project properties String key = getCredentialsKey(); LOGGER.debug(String.format("Remove credentials with key: '%s'", key)); // read the current persisted credentials OrderedProperties credentials = credentialsPersistenceManager.readCredentials(); // remove the credentials with the given key credentials.removeProperty(key); // persist the updated credentials credentialsPersistenceManager.storeCredentials(credentials); }
private String getProjectProperty(String key) { return (String) getProject().getProperties().get(key); }
removeCredentials.setDescription("Removes the credentials specified through the project property 'credentialsKey'."); removeCredentials.setGroup("Credentials"); removeCredentials.setCredentialsPersistenceManager(credentialsPersistenceManager); removeCredentials.getOutputs().upToDateWhen(AlwaysFalseSpec.INSTANCE); LOGGER.debug(String.format("Registered task '%s'", removeCredentials.getName()));
@TaskAction void removeCredentials() throws IOException { // get credentials key from the project properties String key = getCredentialsKey(); LOGGER.debug(String.format("Remove credentials with key: '%s'", key)); // read the current persisted credentials OrderedProperties credentials = credentialsPersistenceManager.readCredentials(); // remove the credentials with the given key credentials.removeProperty(key); // persist the updated credentials credentialsPersistenceManager.storeCredentials(credentials); }
private String getProjectProperty(String key) { return (String) getProject().getProperties().get(key); }
public String getCredentialsKey() { return key != null ? key : getProjectProperty(CredentialsPlugin.CREDENTIALS_KEY_PROPERTY); }