Search in sources :

Example 1 with ConstantSourceProvider

use of com.android.repository.api.ConstantSourceProvider in project android by JetBrains.

the class AndroidSdkUpdaterPlugin method initComponent.

@Override
public void initComponent() {
    if (isAndroidSdkManagerEnabled()) {
        ExternalComponentManager.getInstance().registerComponentSource(new SdkComponentSource());
        URL offlineRepo = getOfflineRepoDir();
        if (offlineRepo != null) {
            // We don't have an actual RepoManager yet, so just get all the modules statically.
            RepositorySourceProvider provider = new ConstantSourceProvider(offlineRepo.toString(), "Offline Repo", AndroidSdkHandler.getAllModules());
            AndroidSdkHandler.addCustomSourceProvider(provider, new StudioLoggerProgressIndicator(getClass()));
        }
    }
}
Also used : StudioLoggerProgressIndicator(com.android.tools.idea.sdk.progress.StudioLoggerProgressIndicator) ConstantSourceProvider(com.android.repository.api.ConstantSourceProvider) RepositorySourceProvider(com.android.repository.api.RepositorySourceProvider) URL(java.net.URL)

Aggregations

ConstantSourceProvider (com.android.repository.api.ConstantSourceProvider)1 RepositorySourceProvider (com.android.repository.api.RepositorySourceProvider)1 StudioLoggerProgressIndicator (com.android.tools.idea.sdk.progress.StudioLoggerProgressIndicator)1 URL (java.net.URL)1