use of com.android.tools.idea.gradle.model.java.JarLibraryDependency in project android by JetBrains.
the class PsJavaDependencyCollection method addDependencies.
private void addDependencies() {
PsParsedDependencies parsedDependencies = myParent.getParsedDependencies();
JavaModuleModel gradleModel = myParent.getGradleModel();
for (JarLibraryDependency libraryDependency : gradleModel.getJarLibraryDependencies()) {
GradleModuleVersion moduleVersion = libraryDependency.getModuleVersion();
if (moduleVersion != null) {
PsArtifactDependencySpec spec = PsArtifactDependencySpec.create(moduleVersion);
ArtifactDependencyModel parsed = parsedDependencies.findLibraryDependency(moduleVersion);
PsLibraryJavaDependency dependency = new PsLibraryJavaDependency(myParent, spec, libraryDependency, parsed);
myLibraryDependenciesBySpec.put(spec.toString(), dependency);
}
}
}
use of com.android.tools.idea.gradle.model.java.JarLibraryDependency in project android by JetBrains.
the class DependenciesModuleSetupStep method doSetUpModule.
@Override
protected void doSetUpModule(@NotNull Module module, @NotNull IdeModifiableModelsProvider ideModelsProvider, @NotNull JavaModuleModel javaModuleModel, @Nullable SyncAction.ModuleModels gradleModels, @Nullable ProgressIndicator indicator) {
List<String> unresolved = new ArrayList<>();
for (JavaModuleDependency dependency : javaModuleModel.getJavaModuleDependencies()) {
updateDependency(module, ideModelsProvider, dependency);
}
for (JarLibraryDependency dependency : javaModuleModel.getJarLibraryDependencies()) {
if (dependency.isResolved()) {
updateDependency(module, ideModelsProvider, dependency);
} else {
unresolved.add(dependency.getName());
}
}
UnresolvedDependenciesReporter.getInstance().report(unresolved, module);
}
Aggregations