use of com.android.tools.idea.gradle.structure.model.android.PsBuildType in project android by JetBrains.
the class AndroidDependencyScopesPanelTest method buildType.
@NotNull
private static PsBuildType buildType(@NotNull String name) {
PsBuildType buildType = mock(PsBuildType.class);
when(buildType.getName()).thenReturn(name);
return buildType;
}
use of com.android.tools.idea.gradle.structure.model.android.PsBuildType in project android by JetBrains.
the class AndroidDependencyScopesPanel method validateInput.
@Override
@Nullable
public ValidationInfo validateInput() {
List<Configuration> configurations = myConfigurationsPanel.getSelectedConfigurations();
if (configurations.isEmpty()) {
return new ValidationInfo("Please select at least one configuration", myConfigurationsPanel);
}
List<PsBuildType> buildTypes = myBuildTypesPanel.getSelectedBuildTypes();
if (buildTypes.isEmpty()) {
return new ValidationInfo("Please select at least one build type", myBuildTypesPanel);
}
if (mySelectedScopeNames.isEmpty()) {
if (configurations.size() == 1 && configurations.contains(ANDROID_TEST)) {
boolean hasDebugBuildType = false;
for (PsBuildType buildType : buildTypes) {
if (buildType.getName().equals(DEBUG_BUILD_TYPE)) {
hasDebugBuildType = true;
break;
}
}
if (!hasDebugBuildType) {
return new ValidationInfo("For 'Android Tests', the 'debug' build type must be selected", myBuildTypesPanel);
}
}
}
return null;
}
Aggregations