Split reviewers plugin into GWT and non-GWT variants
The UI portions have not yet been ported to PolyGerrit, but the plugin
is still useful with no UI, particularly for auto-adding reviewers.
Split the Module file into a ClientModule and BackendModule, and leave
Module as simple wrapper that delegates to both of them. The
backend-only plugin's code lives entirely in the server directory, and
is factored out into a new plugin named reviewers-backend.
The combined Module, its gwt.xml file, as well as its GWT-specific code
(e.g. the top menu) must live directly above the "client" directory,
otherwise the GWT build fails with a mysterious error.
The gerrit_plugin rule needs to be tweaked slightly to allow multiple
rules in the same BUILD file, not all of which match the directory name.
Change-Id: I9e97987428c6e47b1f750ea05e01715ccb400caf
diff --git a/BUILD b/BUILD
index 1ab91f7..c50df23 100644
--- a/BUILD
+++ b/BUILD
@@ -6,9 +6,31 @@
"PLUGIN_TEST_DEPS",
)
+SRC = "src/main/java/com/googlesource/gerrit/plugins/reviewers/"
+
+BACKEND_SRCS = glob([
+ SRC + "common/*.java",
+ SRC + "server/*.java",
+])
+
+gerrit_plugin(
+ name = "reviewers-backend",
+ srcs = BACKEND_SRCS,
+ dir_name = "reviewers",
+ manifest_entries = [
+ # Different jar name, but use same plugin name in manifest so REST API is compatible.
+ "Gerrit-PluginName: reviewers",
+ "Gerrit-Module: com.googlesource.gerrit.plugins.reviewers.server.BackendModule",
+ ],
+ resources = glob(["src/main/resources/**/*"]),
+)
+
gerrit_plugin(
name = "reviewers",
- srcs = glob(["src/main/java/**/*.java"]),
+ srcs = BACKEND_SRCS + glob([
+ SRC + "*.java",
+ SRC + "client/*.java",
+ ]),
gwt_module = "com.googlesource.gerrit.plugins.reviewers.ReviewersForm",
manifest_entries = [
"Gerrit-PluginName: reviewers",
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java
new file mode 100644
index 0000000..a61f1ec
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java
@@ -0,0 +1,44 @@
+// Copyright (C) 2013 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.googlesource.gerrit.plugins.reviewers;
+
+import com.google.gerrit.extensions.config.FactoryModule;
+import com.google.gerrit.extensions.registration.DynamicSet;
+import com.google.gerrit.extensions.webui.GwtPlugin;
+import com.google.gerrit.extensions.webui.TopMenu;
+import com.google.gerrit.extensions.webui.WebUiPlugin;
+import com.google.inject.Inject;
+import com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig;
+
+public class ClientModule extends FactoryModule {
+ private final boolean enableUI;
+
+ @Inject
+ public ClientModule(ReviewersConfig cfg) {
+ this(cfg.enableUI());
+ }
+
+ public ClientModule(boolean enableUI) {
+ this.enableUI = enableUI;
+ }
+
+ @Override
+ protected void configure() {
+ if (enableUI) {
+ DynamicSet.bind(binder(), TopMenu.class).to(ReviewersTopMenu.class);
+ DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("reviewers"));
+ }
+ }
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
index 9951538..7939fe8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
@@ -1,4 +1,4 @@
-// Copyright (C) 2013 The Android Open Source Project
+// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -14,77 +14,22 @@
package com.googlesource.gerrit.plugins.reviewers;
-import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
-import static com.googlesource.gerrit.plugins.reviewers.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
-
-import com.google.gerrit.extensions.annotations.Exports;
-import com.google.gerrit.extensions.config.CapabilityDefinition;
-import com.google.gerrit.extensions.config.FactoryModule;
-import com.google.gerrit.extensions.events.RevisionCreatedListener;
-import com.google.gerrit.extensions.registration.DynamicSet;
-import com.google.gerrit.extensions.restapi.RestApiModule;
-import com.google.gerrit.extensions.webui.GwtPlugin;
-import com.google.gerrit.extensions.webui.TopMenu;
-import com.google.gerrit.extensions.webui.WebUiPlugin;
-import com.google.gerrit.server.change.ReviewerSuggestion;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
+import com.googlesource.gerrit.plugins.reviewers.server.BackendModule;
+import com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig;
-public class Module extends FactoryModule {
- private final boolean enableUI;
- private final boolean enableREST;
- private final boolean suggestOnly;
+public class Module extends AbstractModule {
+ private final ReviewersConfig cfg;
@Inject
public Module(ReviewersConfig cfg) {
- this.enableREST = cfg.enableREST();
- this.enableUI = cfg.enableUI();
- this.suggestOnly = cfg.suggestOnly();
- }
-
- public Module(boolean enableUI, boolean enableREST, boolean suggestOnly) {
- this.enableUI = enableUI;
- this.enableREST = enableREST;
- this.suggestOnly = suggestOnly;
+ this.cfg = cfg;
}
@Override
protected void configure() {
- bind(CapabilityDefinition.class)
- .annotatedWith(Exports.named(MODIFY_REVIEWERS_CONFIG))
- .to(ModifyReviewersConfigCapability.class);
-
- if (enableUI) {
- DynamicSet.bind(binder(), TopMenu.class).to(ReviewersTopMenu.class);
- DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("reviewers"));
- }
-
- if (suggestOnly) {
- install(
- new AbstractModule() {
- @Override
- protected void configure() {
- bind(ReviewerSuggestion.class)
- .annotatedWith(Exports.named("reviewer-suggest"))
- .to(Reviewers.class);
- }
- });
- } else {
- DynamicSet.bind(binder(), RevisionCreatedListener.class).to(Reviewers.class);
- }
-
- factory(AddReviewersByConfiguration.Factory.class);
-
- if (enableREST) {
- install(
- new RestApiModule() {
- @Override
- protected void configure() {
- get(PROJECT_KIND, "reviewers").to(GetReviewers.class);
- put(PROJECT_KIND, "reviewers").to(PutReviewers.class);
- get(PROJECT_KIND, "suggest_reviewers").to(SuggestProjectReviewers.class);
- }
- });
- }
+ install(new BackendModule(cfg.enableREST(), cfg.suggestOnly()));
+ install(new ClientModule(cfg.enableUI()));
}
}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java
similarity index 91%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java
index 04a15fc..ebda5e1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.common;
public enum Action {
ADD,
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java
index afbb377..be04ea4 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.gerrit.extensions.api.GerritApi;
import com.google.gerrit.extensions.api.changes.AddReviewerInput;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java
similarity index 96%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java
index a03c035..1ef93f2 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.gerrit.extensions.api.GerritApi;
import com.google.gerrit.extensions.common.ChangeInfo;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java
new file mode 100644
index 0000000..c233d2b
--- /dev/null
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java
@@ -0,0 +1,78 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.googlesource.gerrit.plugins.reviewers.server;
+
+import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
+import static com.googlesource.gerrit.plugins.reviewers.server.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
+
+import com.google.gerrit.extensions.annotations.Exports;
+import com.google.gerrit.extensions.config.CapabilityDefinition;
+import com.google.gerrit.extensions.config.FactoryModule;
+import com.google.gerrit.extensions.events.RevisionCreatedListener;
+import com.google.gerrit.extensions.registration.DynamicSet;
+import com.google.gerrit.extensions.restapi.RestApiModule;
+import com.google.gerrit.server.change.ReviewerSuggestion;
+import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
+
+public class BackendModule extends FactoryModule {
+ private final boolean enableREST;
+ private final boolean suggestOnly;
+
+ @Inject
+ public BackendModule(ReviewersConfig cfg) {
+ this(cfg.enableREST(), cfg.suggestOnly());
+ }
+
+ public BackendModule(boolean enableREST, boolean suggestOnly) {
+ this.enableREST = enableREST;
+ this.suggestOnly = suggestOnly;
+ }
+
+ @Override
+ protected void configure() {
+ bind(CapabilityDefinition.class)
+ .annotatedWith(Exports.named(MODIFY_REVIEWERS_CONFIG))
+ .to(ModifyReviewersConfigCapability.class);
+
+ if (suggestOnly) {
+ install(
+ new AbstractModule() {
+ @Override
+ protected void configure() {
+ bind(ReviewerSuggestion.class)
+ .annotatedWith(Exports.named("reviewer-suggest"))
+ .to(Reviewers.class);
+ }
+ });
+ } else {
+ DynamicSet.bind(binder(), RevisionCreatedListener.class).to(Reviewers.class);
+ }
+
+ factory(AddReviewersByConfiguration.Factory.class);
+
+ if (enableREST) {
+ install(
+ new RestApiModule() {
+ @Override
+ protected void configure() {
+ get(PROJECT_KIND, "reviewers").to(GetReviewers.class);
+ put(PROJECT_KIND, "reviewers").to(PutReviewers.class);
+ get(PROJECT_KIND, "suggest_reviewers").to(SuggestProjectReviewers.class);
+ }
+ });
+ }
+ }
+}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java
index 7ee4c83..d8ce0ca 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.gerrit.extensions.restapi.RestApiException;
import com.google.gerrit.extensions.restapi.RestReadView;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java
similarity index 93%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java
index 4c6cb9a..b97e422 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.gerrit.extensions.config.CapabilityDefinition;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java
similarity index 94%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java
index b3de693..b90b350 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
-import static com.googlesource.gerrit.plugins.reviewers.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
+import static com.googlesource.gerrit.plugins.reviewers.server.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.extensions.api.access.PluginPermission;
@@ -36,7 +36,8 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
-import com.googlesource.gerrit.plugins.reviewers.PutReviewers.Input;
+import com.googlesource.gerrit.plugins.reviewers.common.Action;
+import com.googlesource.gerrit.plugins.reviewers.server.PutReviewers.Input;
import java.io.IOException;
import java.util.List;
import org.eclipse.jgit.errors.ConfigInvalidException;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java
index 06e7387..7f0000a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import java.util.Objects;
import java.util.Set;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java
index 6fc3ebf..430a588 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import static java.util.stream.Collectors.toSet;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java
index 569373c..a940dae 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableList;
@@ -36,7 +36,7 @@
import org.slf4j.LoggerFactory;
@Singleton
-class ReviewersConfig {
+public class ReviewersConfig {
private static final Logger log = LoggerFactory.getLogger(ReviewersConfig.class);
static final String FILENAME = "reviewers.config";
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java
index cd2479a..6f5c202 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import static java.util.stream.Collectors.toSet;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java
similarity index 97%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java
index 4212e61..b8b076e 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import com.google.gerrit.extensions.common.AccountVisibility;
import com.google.gerrit.extensions.common.SuggestedReviewerInfo;
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index cbc531c..e570e2c 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -57,5 +57,13 @@
./tools/eclipse/project.py
```
+### Backend-only
+
+There are two separate plugin targets, one containing UI components
+(`reviewers`), and one with only backend components (`reviewers-backend`). The
+UI plugin is only compatible with the GWT UI, and does not work with PolyGerrit.
+Both build instructions will work with either `reviewers` or
+`reviewers-backend`.
+
How to build the Gerrit Plugin API is described in the [Gerrit
documentation](../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files).
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java
similarity index 92%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java
index cf3db58..c966a6f 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import static com.google.common.truth.Truth.assertThat;
import static com.google.gerrit.acceptance.GitUtil.fetch;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.FILENAME;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.KEY_REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.SECTION_FILTER;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.FILENAME;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.KEY_REVIEWER;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.SECTION_FILTER;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java
similarity index 93%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java
index f46ca74..6036865 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assert_;
import static com.google.gerrit.acceptance.GitUtil.fetch;
import static com.google.gerrit.extensions.client.ReviewerState.REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.FILENAME;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.KEY_REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.SECTION_FILTER;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.FILENAME;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.KEY_REVIEWER;
+import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.SECTION_FILTER;
import static java.util.stream.Collectors.toSet;
import com.google.common.collect.ImmutableList;
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java
similarity index 97%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java
index c5b89ed..c893a6c 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package com.googlesource.gerrit.plugins.reviewers;
+package com.googlesource.gerrit.plugins.reviewers.server;
import static com.google.common.truth.Truth.assertThat;