Search in sources :

Example 1 with ModuleDependency

use of com.android.tools.idea.gradle.project.sync.setup.module.dependency.ModuleDependency in project android by JetBrains.

the class DependenciesModuleSetupStep method doSetUpModule.

@Override
protected void doSetUpModule(@NotNull Module module, @NotNull IdeModifiableModelsProvider ideModelsProvider, @NotNull AndroidModuleModel androidModel, @Nullable SyncAction.ModuleModels gradleModels, @Nullable ProgressIndicator indicator) {
    AndroidProject androidProject = androidModel.getAndroidProject();
    DependencySet dependencies = myDependenciesExtractor.extractFrom(androidModel);
    for (LibraryDependency dependency : dependencies.onLibraries()) {
        updateLibraryDependency(module, ideModelsProvider, dependency, androidProject);
    }
    for (ModuleDependency dependency : dependencies.onModules()) {
        updateModuleDependency(module, ideModelsProvider, dependency, androidProject);
    }
    addExtraSdkLibrariesAsDependencies(module, ideModelsProvider, androidProject);
    Collection<SyncIssue> syncIssues = androidModel.getSyncIssues();
    if (syncIssues != null) {
        SyncIssuesReporter.getInstance().report(syncIssues, module);
    } else {
        //noinspection deprecation
        Collection<String> unresolvedDependencies = androidProject.getUnresolvedDependencies();
        UnresolvedDependenciesReporter.getInstance().report(unresolvedDependencies, module);
    }
}
Also used : ModuleDependency(com.android.tools.idea.gradle.project.sync.setup.module.dependency.ModuleDependency) LibraryDependency(com.android.tools.idea.gradle.project.sync.setup.module.dependency.LibraryDependency) SyncIssue(com.android.builder.model.SyncIssue) DependencySet(com.android.tools.idea.gradle.project.sync.setup.module.dependency.DependencySet) AndroidProject(com.android.builder.model.AndroidProject)

Aggregations

AndroidProject (com.android.builder.model.AndroidProject)1 SyncIssue (com.android.builder.model.SyncIssue)1 DependencySet (com.android.tools.idea.gradle.project.sync.setup.module.dependency.DependencySet)1 LibraryDependency (com.android.tools.idea.gradle.project.sync.setup.module.dependency.LibraryDependency)1 ModuleDependency (com.android.tools.idea.gradle.project.sync.setup.module.dependency.ModuleDependency)1