Move FactoryModule to gerrit-extension-api

Change-Id: Iabbc26d43f5ee8327d7facb1dadc1a66527268b8
This commit is contained in:
Dave Borowitz 2015-08-26 11:14:35 -04:00
parent 5953bdea1b
commit cb2845b4f8
37 changed files with 41 additions and 34 deletions

View File

@ -18,10 +18,10 @@ import com.google.auto.value.AutoValue;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.lucene.LuceneIndexModule;
import com.google.gerrit.pgm.Daemon;
import com.google.gerrit.pgm.Init;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.git.AsyncReceiveCommits;
import com.google.gerrit.server.index.ChangeSchemas;

View File

@ -28,6 +28,7 @@ java_library(
exported_deps = [
':api',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
'//lib/guice:guice-servlet',
'//lib:servlet-api-3_1',
],
@ -37,7 +38,10 @@ java_library(
java_library(
name = 'api',
srcs = glob([SRC + '**/*.java']),
provided_deps = ['//lib/guice:guice'],
provided_deps = [
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
],
visibility = ['PUBLIC'],
)

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.config;
package com.google.gerrit.extensions.config;
import com.google.inject.AbstractModule;
import com.google.inject.assistedinject.FactoryModuleBuilder;

View File

@ -14,9 +14,9 @@
package com.google.gerrit.httpd.rpc.account;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.httpd.rpc.RpcServletModule;
import com.google.gerrit.httpd.rpc.UiRpcModule;
import com.google.gerrit.server.config.FactoryModule;
public class AccountModule extends RpcServletModule {
public AccountModule() {

View File

@ -14,9 +14,9 @@
package com.google.gerrit.httpd.rpc.changedetail;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.httpd.rpc.RpcServletModule;
import com.google.gerrit.httpd.rpc.UiRpcModule;
import com.google.gerrit.server.config.FactoryModule;
public class ChangeModule extends RpcServletModule {
public ChangeModule() {

View File

@ -14,9 +14,9 @@
package com.google.gerrit.httpd.rpc.project;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.httpd.rpc.RpcServletModule;
import com.google.gerrit.httpd.rpc.UiRpcModule;
import com.google.gerrit.server.config.FactoryModule;
public class ProjectModule extends RpcServletModule {
public ProjectModule() {

View File

@ -16,10 +16,10 @@ package com.google.gerrit.pgm;
import static com.google.gerrit.server.schema.DataSourceProvider.Context.SINGLE_USER;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.lifecycle.LifecycleManager;
import com.google.gerrit.pgm.util.RuntimeShutdown;
import com.google.gerrit.pgm.util.SiteProgram;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.sshd.commands.QueryShell;
import com.google.gerrit.sshd.commands.QueryShell.Factory;
import com.google.inject.Injector;

View File

@ -16,11 +16,11 @@ package com.google.gerrit.pgm;
import static com.google.gerrit.server.schema.DataSourceProvider.Context.SINGLE_USER;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.lifecycle.LifecycleManager;
import com.google.gerrit.pgm.rules.PrologCompiler;
import com.google.gerrit.pgm.util.SiteProgram;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.inject.Inject;
import com.google.inject.Injector;

View File

@ -14,10 +14,10 @@
package com.google.gerrit.pgm.init;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.pgm.init.api.InitFlags;
import com.google.gerrit.pgm.init.api.InitStep;
import com.google.gerrit.pgm.init.api.Section;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.SitePaths;
import com.google.inject.binder.LinkedBindingBuilder;
import com.google.inject.internal.UniqueAnnotations;

View File

@ -16,9 +16,9 @@ package com.google.gerrit.pgm.util;
import com.google.gerrit.common.ChangeHooks;
import com.google.gerrit.common.DisabledChangeHooks;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.git.GitModule;
import com.google.gerrit.server.git.validators.CommitValidationListener;
import com.google.gerrit.server.git.validators.CommitValidators;

View File

@ -17,6 +17,7 @@ package com.google.gerrit.pgm.util;
import static com.google.inject.Scopes.SINGLETON;
import com.google.common.cache.Cache;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.reviewdb.client.AccountGroup;
@ -39,7 +40,6 @@ import com.google.gerrit.server.config.CanonicalWebUrl;
import com.google.gerrit.server.config.CanonicalWebUrlProvider;
import com.google.gerrit.server.config.DisableReverseDnsLookup;
import com.google.gerrit.server.config.DisableReverseDnsLookupProvider;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GitReceivePackGroups;
import com.google.gerrit.server.config.GitUploadPackGroups;
import com.google.gerrit.server.git.MergeUtil;

View File

@ -139,6 +139,7 @@ java_library(
deps = [
':server',
'//gerrit-common:server',
'//gerrit-extension-api:api',
'//lib:guava',
'//lib:junit',
'//lib:truth',

View File

@ -1,7 +1,7 @@
package com.google.gerrit.lifecycle;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.events.LifecycleListener;
import com.google.gerrit.server.config.FactoryModule;
import com.google.inject.Singleton;
import com.google.inject.binder.LinkedBindingBuilder;
import com.google.inject.internal.UniqueAnnotations;

View File

@ -14,8 +14,8 @@
package com.google.gerrit.rules;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.server.config.FactoryModule;
public class PrologModule extends FactoryModule {
@Override

View File

@ -14,6 +14,7 @@
package com.google.gerrit.server;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.Change;
@ -27,7 +28,6 @@ import com.google.gerrit.server.args4j.PatchSetIdHandler;
import com.google.gerrit.server.args4j.ProjectControlHandler;
import com.google.gerrit.server.args4j.SocketAddressHandler;
import com.google.gerrit.server.args4j.TimestampHandler;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.project.ProjectControl;
import com.google.gerrit.util.cli.CmdLineParser;
import com.google.gerrit.util.cli.OptionHandlerUtil;

View File

@ -15,7 +15,7 @@
package com.google.gerrit.server.api.accounts;
import com.google.gerrit.extensions.api.accounts.Accounts;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class Module extends FactoryModule {
@Override

View File

@ -15,7 +15,7 @@
package com.google.gerrit.server.api.changes;
import com.google.gerrit.extensions.api.changes.Changes;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class Module extends FactoryModule {
@Override

View File

@ -16,7 +16,7 @@ package com.google.gerrit.server.api.config;
import com.google.gerrit.extensions.api.config.Config;
import com.google.gerrit.extensions.api.config.Server;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class Module extends FactoryModule {
@Override

View File

@ -15,7 +15,7 @@
package com.google.gerrit.server.api.groups;
import com.google.gerrit.extensions.api.groups.Groups;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class Module extends FactoryModule {
@Override

View File

@ -15,7 +15,7 @@
package com.google.gerrit.server.api.projects;
import com.google.gerrit.extensions.api.projects.Projects;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class Module extends FactoryModule {
@Override

View File

@ -19,7 +19,7 @@ import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.cache.Weigher;
import com.google.gerrit.extensions.annotations.Exports;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.inject.Key;
import com.google.inject.Provider;
import com.google.inject.Scopes;

View File

@ -22,12 +22,12 @@ import static com.google.gerrit.server.change.FileResource.FILE_KIND;
import static com.google.gerrit.server.change.ReviewerResource.REVIEWER_KIND;
import static com.google.gerrit.server.change.RevisionResource.REVISION_KIND;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.extensions.restapi.RestApiModule;
import com.google.gerrit.server.account.AccountLoader;
import com.google.gerrit.server.change.Reviewed.DeleteReviewed;
import com.google.gerrit.server.change.Reviewed.PutReviewed;
import com.google.gerrit.server.config.FactoryModule;
public class Module extends RestApiModule {
@Override

View File

@ -24,6 +24,7 @@ import com.google.gerrit.extensions.config.CloneCommand;
import com.google.gerrit.extensions.config.DownloadCommand;
import com.google.gerrit.extensions.config.DownloadScheme;
import com.google.gerrit.extensions.config.ExternalIncludedIn;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.events.GarbageCollectorListener;
import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
import com.google.gerrit.extensions.events.HeadUpdatedListener;

View File

@ -16,6 +16,7 @@ package com.google.gerrit.server.config;
import static com.google.inject.Scopes.SINGLETON;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.RequestCleanup;
import com.google.gerrit.server.project.PerRequestProjectControlCache;

View File

@ -14,7 +14,7 @@
package com.google.gerrit.server.git;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
/** Configures the Git support. */
public class GitModule extends FactoryModule {

View File

@ -16,13 +16,13 @@ package com.google.gerrit.server.group;
import static com.google.inject.Scopes.SINGLETON;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.gerrit.server.InternalUser;
import com.google.gerrit.server.account.GroupBackend;
import com.google.gerrit.server.account.IncludingGroupMembership;
import com.google.gerrit.server.account.InternalGroupBackend;
import com.google.gerrit.server.account.UniversalGroupBackend;
import com.google.gerrit.server.config.FactoryModule;
public class GroupModule extends FactoryModule {

View File

@ -14,7 +14,7 @@
package com.google.gerrit.server.mail;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class EmailModule extends FactoryModule {
@Override

View File

@ -14,7 +14,7 @@
package com.google.gerrit.server.notedb;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.extensions.config.FactoryModule;
public class NoteDbModule extends FactoryModule {
@Override

View File

@ -16,8 +16,8 @@ package com.google.gerrit.server.project;
import static com.google.inject.Scopes.SINGLETON;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GitReceivePackGroups;
import com.google.gerrit.server.config.GitReceivePackGroupsProvider;
import com.google.gerrit.server.config.GitUploadPackGroups;

View File

@ -16,8 +16,8 @@ package com.google.gerrit.server.schema;
import static com.google.inject.Scopes.SINGLETON;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gwtorm.jdbc.Database;
import com.google.gwtorm.server.SchemaFactory;
import com.google.inject.TypeLiteral;

View File

@ -16,6 +16,7 @@ package com.google.gerrit.server.schema;
import static com.google.inject.Scopes.SINGLETON;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.GerritPersonIdentProvider;
import com.google.gerrit.server.config.AllProjectsName;
@ -24,7 +25,6 @@ import com.google.gerrit.server.config.AllUsersName;
import com.google.gerrit.server.config.AllUsersNameProvider;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.config.AnonymousCowardNameProvider;
import com.google.gerrit.server.config.FactoryModule;
import org.eclipse.jgit.lib.PersonIdent;

View File

@ -21,6 +21,7 @@ import static java.util.concurrent.TimeUnit.SECONDS;
import com.google.common.collect.ImmutableList;
import com.google.gerrit.common.TimeUtil;
import com.google.gerrit.common.data.SubmitRecord;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.CommentRange;
@ -41,7 +42,6 @@ import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.config.AnonymousCowardNameProvider;
import com.google.gerrit.server.config.CanonicalWebUrl;
import com.google.gerrit.server.config.DisableReverseDnsLookup;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.extensions.events.GitReferenceUpdated;
import com.google.gerrit.server.git.GitModule;

View File

@ -28,6 +28,7 @@ import com.google.gerrit.common.data.LabelValue;
import com.google.gerrit.common.data.Permission;
import com.google.gerrit.common.data.PermissionRange;
import com.google.gerrit.common.data.PermissionRule;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
import com.google.gerrit.reviewdb.client.Change;
@ -52,7 +53,6 @@ import com.google.gerrit.server.config.AnonymousCowardNameProvider;
import com.google.gerrit.server.config.CanonicalWebUrl;
import com.google.gerrit.server.config.CanonicalWebUrlProvider;
import com.google.gerrit.server.config.DisableReverseDnsLookup;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.git.GitRepositoryManager;

View File

@ -16,6 +16,7 @@ package com.google.gerrit.server.schema;
import static org.junit.Assert.assertEquals;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.lifecycle.LifecycleManager;
import com.google.gerrit.reviewdb.client.SystemConfig;
import com.google.gerrit.reviewdb.server.ReviewDb;
@ -25,7 +26,6 @@ import com.google.gerrit.server.config.AllProjectsName;
import com.google.gerrit.server.config.AllUsersName;
import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.config.AnonymousCowardNameProvider;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePaths;
import com.google.gerrit.server.git.GitRepositoryManager;

View File

@ -20,6 +20,7 @@ import static com.google.inject.Scopes.SINGLETON;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.gerrit.common.ChangeHooks;
import com.google.gerrit.common.DisabledChangeHooks;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.AuthType;
import com.google.gerrit.reviewdb.server.ReviewDb;
import com.google.gerrit.server.GerritPersonIdent;
@ -33,7 +34,6 @@ import com.google.gerrit.server.config.AnonymousCowardName;
import com.google.gerrit.server.config.AnonymousCowardNameProvider;
import com.google.gerrit.server.config.CanonicalWebUrlModule;
import com.google.gerrit.server.config.CanonicalWebUrlProvider;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.config.GerritGlobalModule;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.SitePath;

View File

@ -18,6 +18,7 @@ import static org.easymock.EasyMock.expect;
import com.google.common.collect.Ordering;
import com.google.gerrit.common.TimeUtil;
import com.google.gerrit.extensions.config.FactoryModule;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.Branch;
import com.google.gerrit.reviewdb.client.Change;
@ -28,7 +29,6 @@ import com.google.gerrit.reviewdb.client.RevId;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.config.AllUsersName;
import com.google.gerrit.server.config.AllUsersNameProvider;
import com.google.gerrit.server.config.FactoryModule;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.notedb.ChangeDraftUpdate;
import com.google.gerrit.server.notedb.ChangeNotes;

@ -1 +1 @@
Subproject commit acdedee5e90bba60cec8be3cdfd9ab3642f4f287
Subproject commit 679301a1b49245c78ca1bce0b62c9fa9e6b32eea