Search in sources :

Example 1 with ExternalRepository

use of com.android.tools.idea.gradle.service.repo.ExternalRepository in project android by JetBrains.

the class UpgradeAppenginePluginVersionHyperlink method execute.

@Override
protected void execute(@NotNull Project project) {
    ExternalRepository repository = ServiceManager.getService(ExternalRepository.class);
    GradleVersion latest = repository.getLatest(APPENGINE_PLUGIN_GROUP_ID, APPENGINE_PLUGIN_ARTIFACT_ID);
    if (latest == null) {
        latest = DEFAULT_APPENGINE_PLUGIN_VERSION;
    }
    myDependency.setVersion(latest.toString());
    runWriteCommandAction(project, myBuildModel::applyChanges);
    GradleSyncInvoker.getInstance().requestProjectSyncAndSourceGeneration(project, null);
}
Also used : ExternalRepository(com.android.tools.idea.gradle.service.repo.ExternalRepository) GradleVersion(com.android.ide.common.repository.GradleVersion)

Aggregations

GradleVersion (com.android.ide.common.repository.GradleVersion)1 ExternalRepository (com.android.tools.idea.gradle.service.repo.ExternalRepository)1