Separate out the plugin API from other Gerrit plugins

The googlesource.com instantiation doesn't support dynamic
plugin-loading, so we must be able to separate the module
for normal Gerrit APIs and the plugin (un)loading.

Change-Id: I480d3cb422b1d5322c5ca3cdeb1f29a775c36a83
This commit is contained in:
Han-Wen Nienhuys
2017-11-30 18:45:40 +01:00
parent b5688c67ba
commit 0b594125eb
4 changed files with 32 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.GerritPersonIdentProvider;
import com.google.gerrit.server.api.GerritApiModule;
import com.google.gerrit.server.api.PluginApiModule;
import com.google.gerrit.server.cache.h2.DefaultCacheFactory;
import com.google.gerrit.server.config.AllProjectsName;
import com.google.gerrit.server.config.AllProjectsNameProvider;
@@ -163,6 +164,7 @@ public class InMemoryModule extends FactoryModule {
bind(MetricMaker.class).to(DisabledMetricMaker.class);
install(cfgInjector.getInstance(GerritGlobalModule.class));
install(new GerritApiModule());
install(new PluginApiModule());
install(new DefaultPermissionBackendModule());
install(new SearchingChangeCacheImpl.Module());
factory(GarbageCollection.Factory.class);