use of com.android.tools.idea.gradle.dependencies.GradleDependencyManager in project android by JetBrains.
the class DependencyManager method checkForNewMissingDependencies.
private boolean checkForNewMissingDependencies() {
Set<String> missing = Collections.emptySet();
if (myModule != null) {
GradleDependencyManager manager = GradleDependencyManager.getInstance(myProject);
List<GradleCoordinate> coordinates = toGradleCoordinatesFromIds(myPalette.getGradleCoordinateIds());
missing = fromGradleCoordinatesToIds(manager.findMissingDependencies(myModule, coordinates));
if (myMissingLibraries.equals(missing)) {
return false;
}
}
myMissingLibraries.clear();
myMissingLibraries.addAll(missing);
return true;
}
use of com.android.tools.idea.gradle.dependencies.GradleDependencyManager in project android by JetBrains.
the class NlOldPalettePanel method checkForNewMissingDependencies.
private boolean checkForNewMissingDependencies() {
Module module = getModule();
List<String> missing = Collections.emptyList();
if (module != null) {
GradleDependencyManager manager = GradleDependencyManager.getInstance(myProject);
Palette palette = myModel.getPalette(myDesignSurface.getLayoutType());
List<GradleCoordinate> dependencies = toGradleCoordinates(palette.getGradleCoordinateIds());
missing = fromGradleCoordinates(manager.findMissingDependencies(module, dependencies));
if (missing.size() == myMissingLibraries.size() && myMissingLibraries.containsAll(missing)) {
return false;
}
}
myMissingLibraries.clear();
myMissingLibraries.addAll(missing);
return true;
}
use of com.android.tools.idea.gradle.dependencies.GradleDependencyManager in project android by JetBrains.
the class DependencyManager method ensureLibraryIsIncluded.
public boolean ensureLibraryIsIncluded(@NotNull Palette.Item item) {
String coordinateId = item.getGradleCoordinateId();
assert coordinateId != null;
assert myModule != null;
GradleDependencyManager manager = GradleDependencyManager.getInstance(myProject);
return manager.ensureLibraryIsIncluded(myModule, toGradleCoordinatesFromIds(Collections.singletonList(coordinateId)), null);
}
Aggregations