use of com.android.tools.idea.gradle.dsl.model.android.SigningConfigModel.SigningConfigPassword.Type in project android by JetBrains.
the class SigningConfigModel method getPasswordValue.
@NotNull
private GradleNullableValue<SigningConfigPassword> getPasswordValue(@NotNull String property) {
GradleDslExpression passwordElement = getPasswordElement(property);
if (passwordElement == null) {
return new GradleNullableValue<>(myDslElement, null);
}
Type passwordType;
switch(passwordElement.getName()) {
case SYSTEM_GETENV:
passwordType = ENVIRONMENT_VARIABLE;
break;
case SYSTEM_CONSOLE_READ_LINE:
passwordType = CONSOLE_READ;
break;
default:
passwordType = PLAIN_TEXT;
break;
}
String passwordText = passwordElement.getValue(String.class);
if (passwordText != null) {
return new GradleNullableValue<>(passwordElement, new SigningConfigPassword(passwordType, passwordText));
}
return new GradleNullableValue<>(passwordElement, null);
}
Aggregations