use of com.android.tools.idea.gradle.dsl.model.values.GradleDefaultValue in project android by JetBrains.
the class RepositoryModel method name.
@NotNull
public GradleDefaultValue<String> name() {
if (myDslElement == null) {
return new GradleDefaultValue<>(null, myDefaultRepoName);
}
GradleDslExpression nameExpression = myDslElement.getPropertyElement(NAME, GradleDslExpression.class);
String name = null;
if (nameExpression != null) {
name = nameExpression.getValue(String.class);
}
if (name == null) {
name = myDefaultRepoName;
}
return new GradleDefaultValue<>(nameExpression, name);
}
use of com.android.tools.idea.gradle.dsl.model.values.GradleDefaultValue in project android by JetBrains.
the class UrlBasedRepositoryModel method url.
@NotNull
public GradleDefaultValue<String> url() {
if (myDslElement == null) {
return new GradleDefaultValue<>(null, myDefaultRepoUrl);
}
GradleDslExpression nameExpression = myDslElement.getPropertyElement(URL, GradleDslExpression.class);
String url = null;
if (nameExpression != null) {
url = nameExpression.getValue(String.class);
}
if (url == null) {
url = myDefaultRepoUrl;
}
return new GradleDefaultValue<>(nameExpression, url);
}
Aggregations