diff --git a/java/google/registry/beam/BUILD b/java/google/registry/beam/BUILD
index 99a1367ff..95553cef8 100644
--- a/java/google/registry/beam/BUILD
+++ b/java/google/registry/beam/BUILD
@@ -9,8 +9,8 @@ java_library(
srcs = glob(["*.java"]),
resources = glob(["sql/*"]),
deps = [
- "//java/google/registry/billing",
"//java/google/registry/config",
+ "//java/google/registry/reporting/billing",
"//java/google/registry/util",
"@com_google_apis_google_api_services_bigquery",
"@com_google_auto_value",
diff --git a/java/google/registry/beam/BillingEvent.java b/java/google/registry/beam/BillingEvent.java
index 73559bec0..f7b8e9ff8 100644
--- a/java/google/registry/beam/BillingEvent.java
+++ b/java/google/registry/beam/BillingEvent.java
@@ -18,7 +18,7 @@ import com.google.auto.value.AutoValue;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
-import google.registry.billing.BillingModule;
+import google.registry.reporting.billing.BillingModule;
import google.registry.util.FormattingLogger;
import java.io.IOException;
import java.io.InputStream;
diff --git a/java/google/registry/beam/InvoicingPipeline.java b/java/google/registry/beam/InvoicingPipeline.java
index bff0e5f4d..9b7f0c410 100644
--- a/java/google/registry/beam/InvoicingPipeline.java
+++ b/java/google/registry/beam/InvoicingPipeline.java
@@ -16,8 +16,9 @@ package google.registry.beam;
import google.registry.beam.BillingEvent.InvoiceGroupingKey;
import google.registry.beam.BillingEvent.InvoiceGroupingKey.InvoiceGroupingKeyCoder;
-import google.registry.billing.BillingModule;
import google.registry.config.RegistryConfig.Config;
+import google.registry.reporting.billing.BillingModule;
+import google.registry.reporting.billing.GenerateInvoicesAction;
import java.io.Serializable;
import javax.inject.Inject;
import org.apache.beam.runners.dataflow.DataflowRunner;
@@ -47,8 +48,7 @@ import org.apache.beam.sdk.values.TypeDescriptors;
* google.registry.tools.DeployInvoicingPipelineCommand} Nomulus command.
*
*
Then, you can run the staged template via the API client library, gCloud or a raw REST call.
- * For an example using the API client library, see {@link
- * google.registry.billing.GenerateInvoicesAction}.
+ * For an example using the API client library, see {@link GenerateInvoicesAction}.
*
* @see Dataflow Templates
*/
diff --git a/java/google/registry/config/RegistryConfig.java b/java/google/registry/config/RegistryConfig.java
index bef7249ff..986b518aa 100644
--- a/java/google/registry/config/RegistryConfig.java
+++ b/java/google/registry/config/RegistryConfig.java
@@ -470,7 +470,7 @@ public final class RegistryConfig {
/**
* Returns the name of the GCS bucket for storing Beam templates and results.
*
- * @see google.registry.billing.GenerateInvoicesAction
+ * @see google.registry.reporting.billing.GenerateInvoicesAction
*/
@Provides
@Config("apacheBeamBucket")
@@ -481,7 +481,7 @@ public final class RegistryConfig {
/**
* Returns the URL of the GCS location for storing Apache Beam related objects.
*
- * @see google.registry.billing.GenerateInvoicesAction
+ * @see google.registry.reporting.billing.GenerateInvoicesAction
*/
@Provides
@Config("apacheBeamBucketUrl")
@@ -492,7 +492,7 @@ public final class RegistryConfig {
/**
* Returns the URL of the GCS location for storing the monthly invoicing Beam template.
*
- * @see google.registry.billing.GenerateInvoicesAction
+ * @see google.registry.reporting.billing.GenerateInvoicesAction
* @see google.registry.beam.InvoicingPipeline
*/
@Provides
@@ -518,7 +518,7 @@ public final class RegistryConfig {
* Returns the Google Cloud Storage bucket for ICANN transaction and activity reports to
* be uploaded.
*
- * @see google.registry.reporting.IcannReportingUploadAction
+ * @see google.registry.reporting.icann.IcannReportingUploadAction
*/
@Provides
@Config("icannReportingBucket")
@@ -529,7 +529,7 @@ public final class RegistryConfig {
/**
* Returns the URL we send HTTP PUT requests for ICANN monthly transactions reports.
*
- * @see google.registry.reporting.IcannHttpReporter
+ * @see google.registry.reporting.icann.IcannHttpReporter
*/
@Provides
@Config("icannTransactionsReportingUploadUrl")
@@ -540,7 +540,7 @@ public final class RegistryConfig {
/**
* Returns the URL we send HTTP PUT requests for ICANN monthly activity reports.
*
- * @see google.registry.reporting.IcannHttpReporter
+ * @see google.registry.reporting.icann.IcannHttpReporter
*/
@Provides
@Config("icannActivityReportingUploadUrl")
@@ -768,7 +768,7 @@ public final class RegistryConfig {
*
This allows us to easily verify the success or failure of periodic tasks by passively
* checking e-mail.
*
- * @see google.registry.reporting.ReportingEmailUtils
+ * @see google.registry.reporting.icann.ReportingEmailUtils
* @see google.registry.billing.BillingEmailUtils
*/
@Provides
@@ -780,7 +780,7 @@ public final class RegistryConfig {
/**
* Returns the email address we send emails from.
*
- * @see google.registry.reporting.ReportingEmailUtils
+ * @see google.registry.reporting.icann.ReportingEmailUtils
* @see google.registry.billing.BillingEmailUtils
*/
diff --git a/java/google/registry/export/PublishDetailReportAction.java b/java/google/registry/export/PublishDetailReportAction.java
index ebbdf349b..6f242127e 100644
--- a/java/google/registry/export/PublishDetailReportAction.java
+++ b/java/google/registry/export/PublishDetailReportAction.java
@@ -41,8 +41,8 @@ import javax.inject.Inject;
* Publish a single registrar detail report from GCS to Drive.
*
*
This is now DEPRECATED, and will be removed upon completion of the billing migration. If you
- * wish to use the functionality, use {@link google.registry.billing.CopyDetailReportsAction}
- * instead.
+ * wish to use the functionality, use {@link
+ * google.registry.reporting.billing.CopyDetailReportsAction} instead.
*/
@Action(
path = PublishDetailReportAction.PATH,
diff --git a/java/google/registry/module/backend/BUILD b/java/google/registry/module/backend/BUILD
index 6f5f9df62..0a1034d01 100644
--- a/java/google/registry/module/backend/BUILD
+++ b/java/google/registry/module/backend/BUILD
@@ -11,7 +11,6 @@ java_library(
"//java/google/registry/backup",
"//java/google/registry/batch",
"//java/google/registry/bigquery",
- "//java/google/registry/billing",
"//java/google/registry/config",
"//java/google/registry/cron",
"//java/google/registry/dns",
@@ -31,6 +30,8 @@ java_library(
"//java/google/registry/rde",
"//java/google/registry/rde/imports",
"//java/google/registry/reporting",
+ "//java/google/registry/reporting/billing",
+ "//java/google/registry/reporting/icann",
"//java/google/registry/request",
"//java/google/registry/request:modules",
"//java/google/registry/request/auth",
diff --git a/java/google/registry/module/backend/BackendModule.java b/java/google/registry/module/backend/BackendModule.java
index d9218fa70..c617c7d86 100644
--- a/java/google/registry/module/backend/BackendModule.java
+++ b/java/google/registry/module/backend/BackendModule.java
@@ -16,9 +16,7 @@ package google.registry.module.backend;
import static google.registry.model.registry.Registries.assertTldExists;
import static google.registry.model.registry.Registries.assertTldsExist;
-import static google.registry.request.RequestParameters.PARAM_YEAR_MONTH;
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
-import static google.registry.request.RequestParameters.extractOptionalParameter;
import static google.registry.request.RequestParameters.extractRequiredParameter;
import static google.registry.request.RequestParameters.extractSetOfParameters;
@@ -26,16 +24,11 @@ import com.google.common.collect.ImmutableSet;
import dagger.Module;
import dagger.Provides;
import google.registry.batch.ExpandRecurringBillingEventsAction;
-import google.registry.request.HttpException.BadRequestException;
import google.registry.request.Parameter;
import google.registry.request.RequestParameters;
-import google.registry.util.Clock;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import org.joda.time.DateTime;
-import org.joda.time.YearMonth;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
/**
* Dagger module for injecting common settings for all Backend tasks.
@@ -63,30 +56,4 @@ public class BackendModule {
return extractOptionalDatetimeParameter(
req, ExpandRecurringBillingEventsAction.PARAM_CURSOR_TIME);
}
-
- /** Extracts an optional YearMonth in yyyy-MM format from the request. */
- @Provides
- @Parameter(PARAM_YEAR_MONTH)
- static Optional provideYearMonthOptional(HttpServletRequest req) {
- DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM");
- Optional optionalYearMonthStr = extractOptionalParameter(req, PARAM_YEAR_MONTH);
- try {
- return optionalYearMonthStr.map(s -> YearMonth.parse(s, formatter));
- } catch (IllegalArgumentException e) {
- throw new BadRequestException(
- String.format(
- "yearMonth must be in yyyy-MM format, got %s instead",
- optionalYearMonthStr.orElse("UNSPECIFIED YEARMONTH")));
- }
- }
-
- /**
- * Provides the yearMonth in yyyy-MM format, if not specified in the request, defaults to one
- * month prior to run time.
- */
- @Provides
- static YearMonth provideYearMonth(
- @Parameter(PARAM_YEAR_MONTH) Optional yearMonthOptional, Clock clock) {
- return yearMonthOptional.orElseGet(() -> new YearMonth(clock.nowUtc().minusMonths(1)));
- }
}
diff --git a/java/google/registry/module/backend/BackendRequestComponent.java b/java/google/registry/module/backend/BackendRequestComponent.java
index b13b143d1..f08db9641 100644
--- a/java/google/registry/module/backend/BackendRequestComponent.java
+++ b/java/google/registry/module/backend/BackendRequestComponent.java
@@ -28,10 +28,6 @@ import google.registry.batch.MapreduceEntityCleanupAction;
import google.registry.batch.RefreshDnsOnHostRenameAction;
import google.registry.batch.ResaveAllEppResourcesAction;
import google.registry.batch.VerifyEntityIntegrityAction;
-import google.registry.billing.BillingModule;
-import google.registry.billing.CopyDetailReportsAction;
-import google.registry.billing.GenerateInvoicesAction;
-import google.registry.billing.PublishInvoicesAction;
import google.registry.cron.CommitLogFanoutAction;
import google.registry.cron.CronModule;
import google.registry.cron.TldFanoutAction;
@@ -69,9 +65,14 @@ import google.registry.rde.imports.RdeDomainImportAction;
import google.registry.rde.imports.RdeHostImportAction;
import google.registry.rde.imports.RdeHostLinkAction;
import google.registry.rde.imports.RdeImportsModule;
-import google.registry.reporting.IcannReportingModule;
-import google.registry.reporting.IcannReportingStagingAction;
-import google.registry.reporting.IcannReportingUploadAction;
+import google.registry.reporting.ReportingModule;
+import google.registry.reporting.billing.BillingModule;
+import google.registry.reporting.billing.CopyDetailReportsAction;
+import google.registry.reporting.billing.GenerateInvoicesAction;
+import google.registry.reporting.billing.PublishInvoicesAction;
+import google.registry.reporting.icann.IcannReportingModule;
+import google.registry.reporting.icann.IcannReportingStagingAction;
+import google.registry.reporting.icann.IcannReportingUploadAction;
import google.registry.request.RequestComponentBuilder;
import google.registry.request.RequestModule;
import google.registry.request.RequestScope;
@@ -101,6 +102,7 @@ import google.registry.tmch.TmchSmdrlAction;
MapreduceModule.class,
RdeModule.class,
RdeImportsModule.class,
+ ReportingModule.class,
RequestModule.class,
SheetModule.class,
TmchModule.class,
diff --git a/java/google/registry/reporting/BUILD b/java/google/registry/reporting/BUILD
index dac5e8e81..2aba252ea 100644
--- a/java/google/registry/reporting/BUILD
+++ b/java/google/registry/reporting/BUILD
@@ -7,27 +7,11 @@ licenses(["notice"]) # Apache 2.0
java_library(
name = "reporting",
srcs = glob(["*.java"]),
- resources = glob(["sql/*"]),
deps = [
- "//java/google/registry/bigquery",
- "//java/google/registry/config",
- "//java/google/registry/gcs",
- "//java/google/registry/keyring/api",
- "//java/google/registry/model",
"//java/google/registry/request",
- "//java/google/registry/request/auth",
"//java/google/registry/util",
- "//java/google/registry/xjc",
- "//java/google/registry/xml",
- "@com_google_api_client",
- "@com_google_apis_google_api_services_bigquery",
- "@com_google_appengine_api_1_0_sdk",
- "@com_google_appengine_tools_appengine_gcs_client",
"@com_google_code_findbugs_jsr305",
"@com_google_dagger",
- "@com_google_guava",
- "@com_google_http_client",
- "@com_google_http_client_jackson2",
"@javax_servlet_api",
"@joda_time",
],
diff --git a/java/google/registry/reporting/ReportingModule.java b/java/google/registry/reporting/ReportingModule.java
new file mode 100644
index 000000000..67bfdd25c
--- /dev/null
+++ b/java/google/registry/reporting/ReportingModule.java
@@ -0,0 +1,67 @@
+// Copyright 2017 The Nomulus Authors. All Rights Reserved.
+//
+// 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 google.registry.reporting;
+
+import static google.registry.request.RequestParameters.extractOptionalParameter;
+
+import dagger.Module;
+import dagger.Provides;
+import google.registry.request.HttpException.BadRequestException;
+import google.registry.request.Parameter;
+import google.registry.util.Clock;
+import java.util.Optional;
+import javax.servlet.http.HttpServletRequest;
+import org.joda.time.YearMonth;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+
+/**
+ * Dagger module for injecting common settings for all Backend tasks.
+ */
+@Module
+public class ReportingModule {
+
+ /**
+ * The request parameter name used by reporting actions that takes a year/month parameter, which
+ * defaults to the last month.
+ */
+ public static final String PARAM_YEAR_MONTH = "yearMonth";
+
+ /** Extracts an optional YearMonth in yyyy-MM format from the request. */
+ @Provides
+ @Parameter(PARAM_YEAR_MONTH)
+ static Optional provideYearMonthOptional(HttpServletRequest req) {
+ DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM");
+ Optional optionalYearMonthStr = extractOptionalParameter(req, PARAM_YEAR_MONTH);
+ try {
+ return optionalYearMonthStr.map(s -> YearMonth.parse(s, formatter));
+ } catch (IllegalArgumentException e) {
+ throw new BadRequestException(
+ String.format(
+ "yearMonth must be in yyyy-MM format, got %s instead",
+ optionalYearMonthStr.orElse("UNSPECIFIED YEARMONTH")));
+ }
+ }
+
+ /**
+ * Provides the yearMonth in yyyy-MM format, if not specified in the request, defaults to one
+ * month prior to run time.
+ */
+ @Provides
+ static YearMonth provideYearMonth(
+ @Parameter(PARAM_YEAR_MONTH) Optional yearMonthOptional, Clock clock) {
+ return yearMonthOptional.orElseGet(() -> new YearMonth(clock.nowUtc().minusMonths(1)));
+ }
+}
diff --git a/java/google/registry/billing/BUILD b/java/google/registry/reporting/billing/BUILD
similarity index 96%
rename from java/google/registry/billing/BUILD
rename to java/google/registry/reporting/billing/BUILD
index 121f04a10..ebe1165f6 100644
--- a/java/google/registry/billing/BUILD
+++ b/java/google/registry/reporting/billing/BUILD
@@ -14,6 +14,7 @@ java_library(
"//java/google/registry/config",
"//java/google/registry/gcs",
"//java/google/registry/model",
+ "//java/google/registry/reporting",
"//java/google/registry/request",
"//java/google/registry/request/auth",
"//java/google/registry/storage/drive",
diff --git a/java/google/registry/billing/BillingEmailUtils.java b/java/google/registry/reporting/billing/BillingEmailUtils.java
similarity index 98%
rename from java/google/registry/billing/BillingEmailUtils.java
rename to java/google/registry/reporting/billing/BillingEmailUtils.java
index 24a34a9d4..91d467f0d 100644
--- a/java/google/registry/billing/BillingEmailUtils.java
+++ b/java/google/registry/reporting/billing/BillingEmailUtils.java
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.appengine.tools.cloudstorage.GcsFilename;
import com.google.common.collect.ImmutableList;
import com.google.common.io.CharStreams;
-import google.registry.billing.BillingModule.InvoiceDirectoryPrefix;
import google.registry.config.RegistryConfig.Config;
import google.registry.gcs.GcsUtils;
+import google.registry.reporting.billing.BillingModule.InvoiceDirectoryPrefix;
import google.registry.util.FormattingLogger;
import google.registry.util.Retrier;
import google.registry.util.SendEmailService;
diff --git a/java/google/registry/billing/BillingModule.java b/java/google/registry/reporting/billing/BillingModule.java
similarity index 98%
rename from java/google/registry/billing/BillingModule.java
rename to java/google/registry/reporting/billing/BillingModule.java
index 3a6810f9a..610d3a6fc 100644
--- a/java/google/registry/billing/BillingModule.java
+++ b/java/google/registry/reporting/billing/BillingModule.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static google.registry.request.RequestParameters.extractRequiredParameter;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
diff --git a/java/google/registry/billing/CopyDetailReportsAction.java b/java/google/registry/reporting/billing/CopyDetailReportsAction.java
similarity index 97%
rename from java/google/registry/billing/CopyDetailReportsAction.java
rename to java/google/registry/reporting/billing/CopyDetailReportsAction.java
index ce61eb468..dff1e959a 100644
--- a/java/google/registry/billing/CopyDetailReportsAction.java
+++ b/java/google/registry/reporting/billing/CopyDetailReportsAction.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static google.registry.request.Action.Method.POST;
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
@@ -22,10 +22,10 @@ import com.google.appengine.tools.cloudstorage.GcsFilename;
import com.google.common.collect.ImmutableList;
import com.google.common.io.ByteStreams;
import com.google.common.net.MediaType;
-import google.registry.billing.BillingModule.InvoiceDirectoryPrefix;
import google.registry.config.RegistryConfig.Config;
import google.registry.gcs.GcsUtils;
import google.registry.model.registrar.Registrar;
+import google.registry.reporting.billing.BillingModule.InvoiceDirectoryPrefix;
import google.registry.request.Action;
import google.registry.request.Response;
import google.registry.request.auth.Auth;
diff --git a/java/google/registry/billing/GenerateInvoicesAction.java b/java/google/registry/reporting/billing/GenerateInvoicesAction.java
similarity index 98%
rename from java/google/registry/billing/GenerateInvoicesAction.java
rename to java/google/registry/reporting/billing/GenerateInvoicesAction.java
index 3120dacf2..f66d006dd 100644
--- a/java/google/registry/billing/GenerateInvoicesAction.java
+++ b/java/google/registry/reporting/billing/GenerateInvoicesAction.java
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
+import static google.registry.reporting.ReportingModule.PARAM_YEAR_MONTH;
import static google.registry.request.Action.Method.POST;
-import static google.registry.request.RequestParameters.PARAM_YEAR_MONTH;
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
import static javax.servlet.http.HttpServletResponse.SC_OK;
diff --git a/java/google/registry/billing/PublishInvoicesAction.java b/java/google/registry/reporting/billing/PublishInvoicesAction.java
similarity index 97%
rename from java/google/registry/billing/PublishInvoicesAction.java
rename to java/google/registry/reporting/billing/PublishInvoicesAction.java
index edb71cbcf..adbbed9d2 100644
--- a/java/google/registry/billing/PublishInvoicesAction.java
+++ b/java/google/registry/reporting/billing/PublishInvoicesAction.java
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
+import static google.registry.reporting.ReportingModule.PARAM_YEAR_MONTH;
import static google.registry.request.Action.Method.POST;
-import static google.registry.request.RequestParameters.PARAM_YEAR_MONTH;
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
import static javax.servlet.http.HttpServletResponse.SC_NOT_MODIFIED;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
diff --git a/java/google/registry/reporting/ActivityReportingQueryBuilder.java b/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java
similarity index 96%
rename from java/google/registry/reporting/ActivityReportingQueryBuilder.java
rename to java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java
index 5ebbfe39b..5868e9a81 100644
--- a/java/google/registry/reporting/ActivityReportingQueryBuilder.java
+++ b/java/google/registry/reporting/icann/ActivityReportingQueryBuilder.java
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
-import static google.registry.reporting.IcannReportingModule.DATASTORE_EXPORT_DATA_SET;
-import static google.registry.reporting.IcannReportingModule.ICANN_REPORTING_DATA_SET;
+import static google.registry.reporting.icann.IcannReportingModule.DATASTORE_EXPORT_DATA_SET;
+import static google.registry.reporting.icann.IcannReportingModule.ICANN_REPORTING_DATA_SET;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
diff --git a/java/google/registry/reporting/icann/BUILD b/java/google/registry/reporting/icann/BUILD
new file mode 100644
index 000000000..092985f0c
--- /dev/null
+++ b/java/google/registry/reporting/icann/BUILD
@@ -0,0 +1,34 @@
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+licenses(["notice"]) # Apache 2.0
+
+java_library(
+ name = "icann",
+ srcs = glob(["*.java"]),
+ resources = glob(["sql/*"]),
+ deps = [
+ "//java/google/registry/bigquery",
+ "//java/google/registry/config",
+ "//java/google/registry/gcs",
+ "//java/google/registry/keyring/api",
+ "//java/google/registry/model",
+ "//java/google/registry/request",
+ "//java/google/registry/request/auth",
+ "//java/google/registry/util",
+ "//java/google/registry/xjc",
+ "//java/google/registry/xml",
+ "@com_google_api_client",
+ "@com_google_apis_google_api_services_bigquery",
+ "@com_google_appengine_api_1_0_sdk",
+ "@com_google_appengine_tools_appengine_gcs_client",
+ "@com_google_code_findbugs_jsr305",
+ "@com_google_dagger",
+ "@com_google_guava",
+ "@com_google_http_client",
+ "@com_google_http_client_jackson2",
+ "@javax_servlet_api",
+ "@joda_time",
+ ],
+)
diff --git a/java/google/registry/reporting/IcannHttpReporter.java b/java/google/registry/reporting/icann/IcannHttpReporter.java
similarity index 98%
rename from java/google/registry/reporting/IcannHttpReporter.java
rename to java/google/registry/reporting/icann/IcannHttpReporter.java
index 262cbf4ee..b752bf708 100644
--- a/java/google/registry/reporting/IcannHttpReporter.java
+++ b/java/google/registry/reporting/icann/IcannHttpReporter.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.net.MediaType.CSV_UTF_8;
@@ -30,7 +30,7 @@ import com.google.common.base.Splitter;
import com.google.common.io.ByteStreams;
import google.registry.config.RegistryConfig.Config;
import google.registry.keyring.api.KeyModule.Key;
-import google.registry.reporting.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
import google.registry.util.FormattingLogger;
import google.registry.xjc.XjcXmlTransformer;
import google.registry.xjc.iirdea.XjcIirdeaResponseElement;
diff --git a/java/google/registry/reporting/IcannReportingModule.java b/java/google/registry/reporting/icann/IcannReportingModule.java
similarity index 99%
rename from java/google/registry/reporting/IcannReportingModule.java
rename to java/google/registry/reporting/icann/IcannReportingModule.java
index 73608fa00..0d4343975 100644
--- a/java/google/registry/reporting/IcannReportingModule.java
+++ b/java/google/registry/reporting/icann/IcannReportingModule.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static google.registry.request.RequestParameters.extractOptionalEnumParameter;
import static google.registry.request.RequestParameters.extractOptionalParameter;
diff --git a/java/google/registry/reporting/IcannReportingStager.java b/java/google/registry/reporting/icann/IcannReportingStager.java
similarity index 97%
rename from java/google/registry/reporting/IcannReportingStager.java
rename to java/google/registry/reporting/icann/IcannReportingStager.java
index 4bd099296..0f5e26050 100644
--- a/java/google/registry/reporting/IcannReportingStager.java
+++ b/java/google/registry/reporting/icann/IcannReportingStager.java
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Strings.isNullOrEmpty;
import static com.google.common.collect.ImmutableList.toImmutableList;
-import static google.registry.reporting.IcannReportingModule.MANIFEST_FILE_NAME;
+import static google.registry.reporting.icann.IcannReportingModule.MANIFEST_FILE_NAME;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.api.services.bigquery.model.TableFieldSchema;
@@ -34,8 +34,8 @@ import google.registry.bigquery.BigqueryConnection;
import google.registry.bigquery.BigqueryUtils.TableType;
import google.registry.config.RegistryConfig.Config;
import google.registry.gcs.GcsUtils;
-import google.registry.reporting.IcannReportingModule.ReportType;
-import google.registry.reporting.IcannReportingModule.ReportingSubdir;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportingSubdir;
import google.registry.util.FormattingLogger;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/java/google/registry/reporting/IcannReportingStagingAction.java b/java/google/registry/reporting/icann/IcannReportingStagingAction.java
similarity index 96%
rename from java/google/registry/reporting/IcannReportingStagingAction.java
rename to java/google/registry/reporting/icann/IcannReportingStagingAction.java
index ec4eb5265..b334eae43 100644
--- a/java/google/registry/reporting/IcannReportingStagingAction.java
+++ b/java/google/registry/reporting/icann/IcannReportingStagingAction.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static google.registry.request.Action.Method.POST;
import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
@@ -25,8 +25,8 @@ import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.net.MediaType;
import google.registry.bigquery.BigqueryJobFailureException;
-import google.registry.reporting.IcannReportingModule.ReportType;
-import google.registry.reporting.IcannReportingModule.ReportingSubdir;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportingSubdir;
import google.registry.request.Action;
import google.registry.request.Response;
import google.registry.request.auth.Auth;
diff --git a/java/google/registry/reporting/IcannReportingUploadAction.java b/java/google/registry/reporting/icann/IcannReportingUploadAction.java
similarity index 96%
rename from java/google/registry/reporting/IcannReportingUploadAction.java
rename to java/google/registry/reporting/icann/IcannReportingUploadAction.java
index fc9be7239..20d58a1ff 100644
--- a/java/google/registry/reporting/IcannReportingUploadAction.java
+++ b/java/google/registry/reporting/icann/IcannReportingUploadAction.java
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.net.MediaType.PLAIN_TEXT_UTF_8;
-import static google.registry.reporting.IcannReportingModule.MANIFEST_FILE_NAME;
+import static google.registry.reporting.icann.IcannReportingModule.MANIFEST_FILE_NAME;
import static google.registry.request.Action.Method.POST;
import static java.nio.charset.StandardCharsets.UTF_8;
import static javax.servlet.http.HttpServletResponse.SC_OK;
@@ -28,7 +28,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.io.ByteStreams;
import google.registry.config.RegistryConfig.Config;
import google.registry.gcs.GcsUtils;
-import google.registry.reporting.IcannReportingModule.ReportingSubdir;
+import google.registry.reporting.icann.IcannReportingModule.ReportingSubdir;
import google.registry.request.Action;
import google.registry.request.Response;
import google.registry.request.auth.Auth;
diff --git a/java/google/registry/reporting/QueryBuilder.java b/java/google/registry/reporting/icann/QueryBuilder.java
similarity index 96%
rename from java/google/registry/reporting/QueryBuilder.java
rename to java/google/registry/reporting/icann/QueryBuilder.java
index 5bbe756b4..2e229d1a1 100644
--- a/java/google/registry/reporting/QueryBuilder.java
+++ b/java/google/registry/reporting/icann/QueryBuilder.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import com.google.common.collect.ImmutableMap;
import java.io.IOException;
diff --git a/java/google/registry/reporting/ReportingEmailUtils.java b/java/google/registry/reporting/icann/ReportingEmailUtils.java
similarity index 97%
rename from java/google/registry/reporting/ReportingEmailUtils.java
rename to java/google/registry/reporting/icann/ReportingEmailUtils.java
index b9bf5e15b..fa734b945 100644
--- a/java/google/registry/reporting/ReportingEmailUtils.java
+++ b/java/google/registry/reporting/icann/ReportingEmailUtils.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import google.registry.config.RegistryConfig.Config;
import google.registry.util.FormattingLogger;
diff --git a/java/google/registry/reporting/TransactionsReportingQueryBuilder.java b/java/google/registry/reporting/icann/TransactionsReportingQueryBuilder.java
similarity index 97%
rename from java/google/registry/reporting/TransactionsReportingQueryBuilder.java
rename to java/google/registry/reporting/icann/TransactionsReportingQueryBuilder.java
index f19382cd6..bb138dbf7 100644
--- a/java/google/registry/reporting/TransactionsReportingQueryBuilder.java
+++ b/java/google/registry/reporting/icann/TransactionsReportingQueryBuilder.java
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
-import static google.registry.reporting.IcannReportingModule.DATASTORE_EXPORT_DATA_SET;
-import static google.registry.reporting.IcannReportingModule.ICANN_REPORTING_DATA_SET;
+import static google.registry.reporting.icann.IcannReportingModule.DATASTORE_EXPORT_DATA_SET;
+import static google.registry.reporting.icann.IcannReportingModule.ICANN_REPORTING_DATA_SET;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Resources;
diff --git a/java/google/registry/reporting/sql/activity_report_aggregation.sql b/java/google/registry/reporting/icann/sql/activity_report_aggregation.sql
similarity index 100%
rename from java/google/registry/reporting/sql/activity_report_aggregation.sql
rename to java/google/registry/reporting/icann/sql/activity_report_aggregation.sql
diff --git a/java/google/registry/reporting/sql/attempted_adds.sql b/java/google/registry/reporting/icann/sql/attempted_adds.sql
similarity index 100%
rename from java/google/registry/reporting/sql/attempted_adds.sql
rename to java/google/registry/reporting/icann/sql/attempted_adds.sql
diff --git a/java/google/registry/reporting/sql/dns_counts.sql b/java/google/registry/reporting/icann/sql/dns_counts.sql
similarity index 100%
rename from java/google/registry/reporting/sql/dns_counts.sql
rename to java/google/registry/reporting/icann/sql/dns_counts.sql
diff --git a/java/google/registry/reporting/sql/epp_metrics.sql b/java/google/registry/reporting/icann/sql/epp_metrics.sql
similarity index 100%
rename from java/google/registry/reporting/sql/epp_metrics.sql
rename to java/google/registry/reporting/icann/sql/epp_metrics.sql
diff --git a/java/google/registry/reporting/sql/monthly_logs.sql b/java/google/registry/reporting/icann/sql/monthly_logs.sql
similarity index 100%
rename from java/google/registry/reporting/sql/monthly_logs.sql
rename to java/google/registry/reporting/icann/sql/monthly_logs.sql
diff --git a/java/google/registry/reporting/sql/registrar_iana_id.sql b/java/google/registry/reporting/icann/sql/registrar_iana_id.sql
similarity index 100%
rename from java/google/registry/reporting/sql/registrar_iana_id.sql
rename to java/google/registry/reporting/icann/sql/registrar_iana_id.sql
diff --git a/java/google/registry/reporting/sql/registrar_operating_status.sql b/java/google/registry/reporting/icann/sql/registrar_operating_status.sql
similarity index 100%
rename from java/google/registry/reporting/sql/registrar_operating_status.sql
rename to java/google/registry/reporting/icann/sql/registrar_operating_status.sql
diff --git a/java/google/registry/reporting/sql/total_domains.sql b/java/google/registry/reporting/icann/sql/total_domains.sql
similarity index 100%
rename from java/google/registry/reporting/sql/total_domains.sql
rename to java/google/registry/reporting/icann/sql/total_domains.sql
diff --git a/java/google/registry/reporting/sql/total_nameservers.sql b/java/google/registry/reporting/icann/sql/total_nameservers.sql
similarity index 100%
rename from java/google/registry/reporting/sql/total_nameservers.sql
rename to java/google/registry/reporting/icann/sql/total_nameservers.sql
diff --git a/java/google/registry/reporting/sql/transaction_counts.sql b/java/google/registry/reporting/icann/sql/transaction_counts.sql
similarity index 100%
rename from java/google/registry/reporting/sql/transaction_counts.sql
rename to java/google/registry/reporting/icann/sql/transaction_counts.sql
diff --git a/java/google/registry/reporting/sql/transactions_report_aggregation.sql b/java/google/registry/reporting/icann/sql/transactions_report_aggregation.sql
similarity index 100%
rename from java/google/registry/reporting/sql/transactions_report_aggregation.sql
rename to java/google/registry/reporting/icann/sql/transactions_report_aggregation.sql
diff --git a/java/google/registry/reporting/sql/whois_counts.sql b/java/google/registry/reporting/icann/sql/whois_counts.sql
similarity index 100%
rename from java/google/registry/reporting/sql/whois_counts.sql
rename to java/google/registry/reporting/icann/sql/whois_counts.sql
diff --git a/java/google/registry/request/RequestParameters.java b/java/google/registry/request/RequestParameters.java
index 9c7d7c29d..bbd7da310 100644
--- a/java/google/registry/request/RequestParameters.java
+++ b/java/google/registry/request/RequestParameters.java
@@ -32,11 +32,6 @@ public final class RequestParameters {
/** The standardized request parameter name used by any action that takes a tld parameter. */
public static final String PARAM_TLD = "tld";
- /**
- * The standardized request parameter name used by any action that takes a year/month parameter.
- */
- public static final String PARAM_YEAR_MONTH = "yearMonth";
-
/**
* Returns first GET or POST parameter associated with {@code name}.
*
diff --git a/javatests/google/registry/module/backend/BackendModuleTest.java b/javatests/google/registry/reporting/ReportingModuleTest.java
similarity index 81%
rename from javatests/google/registry/module/backend/BackendModuleTest.java
rename to javatests/google/registry/reporting/ReportingModuleTest.java
index 0abb8cbfc..104c2fd4f 100644
--- a/javatests/google/registry/module/backend/BackendModuleTest.java
+++ b/javatests/google/registry/reporting/ReportingModuleTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.module.backend;
+package google.registry.reporting;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.JUnitBackports.expectThrows;
@@ -31,9 +31,9 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link BackendModule}. */
+/** Unit tests for {@link ReportingModule}. */
@RunWith(JUnit4.class)
-public class BackendModuleTest {
+public class ReportingModuleTest {
private HttpServletRequest req = mock(HttpServletRequest.class);
private Clock clock;
@@ -45,7 +45,7 @@ public class BackendModuleTest {
@Test
public void testEmptyYearMonthParameter_returnsEmptyYearMonthOptional() {
when(req.getParameter("yearMonth")).thenReturn("");
- assertThat(BackendModule.provideYearMonthOptional(req)).isEqualTo(Optional.empty());
+ assertThat(ReportingModule.provideYearMonthOptional(req)).isEqualTo(Optional.empty());
}
@Test
@@ -53,7 +53,7 @@ public class BackendModuleTest {
when(req.getParameter("yearMonth")).thenReturn("201705");
BadRequestException thrown =
expectThrows(
- BadRequestException.class, () -> BackendModule.provideYearMonthOptional(req));
+ BadRequestException.class, () -> ReportingModule.provideYearMonthOptional(req));
assertThat(thrown)
.hasMessageThat()
.contains("yearMonth must be in yyyy-MM format, got 201705 instead");
@@ -61,13 +61,13 @@ public class BackendModuleTest {
@Test
public void testEmptyYearMonth_returnsLastMonth() {
- assertThat(BackendModule.provideYearMonth(Optional.empty(), clock))
+ assertThat(ReportingModule.provideYearMonth(Optional.empty(), clock))
.isEqualTo(new YearMonth(2017, 6));
}
@Test
public void testGivenYearMonth_returnsThatMonth() {
- assertThat(BackendModule.provideYearMonth(Optional.of(new YearMonth(2017, 5)), clock))
+ assertThat(ReportingModule.provideYearMonth(Optional.of(new YearMonth(2017, 5)), clock))
.isEqualTo(new YearMonth(2017, 5));
}
diff --git a/javatests/google/registry/billing/BUILD b/javatests/google/registry/reporting/billing/BUILD
similarity index 96%
rename from javatests/google/registry/billing/BUILD
rename to javatests/google/registry/reporting/billing/BUILD
index bdeae76ab..0d0338df6 100644
--- a/javatests/google/registry/billing/BUILD
+++ b/javatests/google/registry/reporting/billing/BUILD
@@ -11,8 +11,8 @@ java_library(
name = "billing",
srcs = glob(["*.java"]),
deps = [
- "//java/google/registry/billing",
"//java/google/registry/gcs",
+ "//java/google/registry/reporting/billing",
"//java/google/registry/storage/drive",
"//java/google/registry/util",
"//javatests/google/registry/testing",
diff --git a/javatests/google/registry/billing/BillingEmailUtilsTest.java b/javatests/google/registry/reporting/billing/BillingEmailUtilsTest.java
similarity index 98%
rename from javatests/google/registry/billing/BillingEmailUtilsTest.java
rename to javatests/google/registry/reporting/billing/BillingEmailUtilsTest.java
index da85aaf00..214c74b79 100644
--- a/javatests/google/registry/billing/BillingEmailUtilsTest.java
+++ b/javatests/google/registry/reporting/billing/BillingEmailUtilsTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
@@ -50,7 +50,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-/** Unit tests for {@link BillingEmailUtils}. */
+/** Unit tests for {@link google.registry.reporting.billing.BillingEmailUtils}. */
@RunWith(JUnit4.class)
public class BillingEmailUtilsTest {
diff --git a/javatests/google/registry/billing/CopyDetailReportsActionTest.java b/javatests/google/registry/reporting/billing/CopyDetailReportsActionTest.java
similarity index 98%
rename from javatests/google/registry/billing/CopyDetailReportsActionTest.java
rename to javatests/google/registry/reporting/billing/CopyDetailReportsActionTest.java
index bafbc063b..430218513 100644
--- a/javatests/google/registry/billing/CopyDetailReportsActionTest.java
+++ b/javatests/google/registry/reporting/billing/CopyDetailReportsActionTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.DatastoreHelper.loadRegistrar;
@@ -47,7 +47,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link CopyDetailReportsAction}. */
+/** Unit tests for {@link google.registry.reporting.billing.CopyDetailReportsAction}. */
@RunWith(JUnit4.class)
public class CopyDetailReportsActionTest {
diff --git a/javatests/google/registry/billing/GenerateInvoicesActionTest.java b/javatests/google/registry/reporting/billing/GenerateInvoicesActionTest.java
similarity index 97%
rename from javatests/google/registry/billing/GenerateInvoicesActionTest.java
rename to javatests/google/registry/reporting/billing/GenerateInvoicesActionTest.java
index d3da38182..f9bb7e0bb 100644
--- a/javatests/google/registry/billing/GenerateInvoicesActionTest.java
+++ b/javatests/google/registry/reporting/billing/GenerateInvoicesActionTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.TaskQueueHelper.assertTasksEnqueued;
@@ -41,7 +41,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link GenerateInvoicesAction}. */
+/** Unit tests for {@link google.registry.reporting.billing.GenerateInvoicesAction}. */
@RunWith(JUnit4.class)
public class GenerateInvoicesActionTest {
diff --git a/javatests/google/registry/billing/PublishInvoicesActionTest.java b/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
similarity index 99%
rename from javatests/google/registry/billing/PublishInvoicesActionTest.java
rename to javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
index d73dfca00..dcdd4186d 100644
--- a/javatests/google/registry/billing/PublishInvoicesActionTest.java
+++ b/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.billing;
+package google.registry.reporting.billing;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.TaskQueueHelper.assertTasksEnqueued;
diff --git a/javatests/google/registry/reporting/ActivityReportingQueryBuilderTest.java b/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
similarity index 98%
rename from javatests/google/registry/reporting/ActivityReportingQueryBuilderTest.java
rename to javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
index c6bc5c11a..a751eb624 100644
--- a/javatests/google/registry/reporting/ActivityReportingQueryBuilderTest.java
+++ b/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
diff --git a/javatests/google/registry/reporting/icann/BUILD b/javatests/google/registry/reporting/icann/BUILD
new file mode 100644
index 000000000..8ec2884ce
--- /dev/null
+++ b/javatests/google/registry/reporting/icann/BUILD
@@ -0,0 +1,42 @@
+package(
+ default_testonly = 1,
+ default_visibility = ["//java/google/registry:registry_project"],
+)
+
+licenses(["notice"]) # Apache 2.0
+
+load("//java/com/google/testing/builddefs:GenTestRules.bzl", "GenTestRules")
+
+java_library(
+ name = "icann",
+ srcs = glob(["*.java"]),
+ resources = glob(["testdata/*"]),
+ deps = [
+ "//java/google/registry/bigquery",
+ "//java/google/registry/gcs",
+ "//java/google/registry/reporting/icann",
+ "//java/google/registry/request",
+ "//java/google/registry/util",
+ "//javatests/google/registry/testing",
+ "@com_google_apis_google_api_services_bigquery",
+ "@com_google_appengine_api_1_0_sdk",
+ "@com_google_appengine_tools_appengine_gcs_client",
+ "@com_google_code_findbugs_jsr305",
+ "@com_google_dagger",
+ "@com_google_guava",
+ "@com_google_http_client",
+ "@com_google_truth",
+ "@com_google_truth_extensions_truth_java8_extension",
+ "@javax_servlet_api",
+ "@joda_time",
+ "@junit",
+ "@org_mockito_all",
+ ],
+)
+
+GenTestRules(
+ name = "GeneratedTestRules",
+ default_test_size = "small",
+ test_files = glob(["*Test.java"]),
+ deps = [":icann"],
+)
diff --git a/javatests/google/registry/reporting/IcannHttpReporterTest.java b/javatests/google/registry/reporting/icann/IcannHttpReporterTest.java
similarity index 98%
rename from javatests/google/registry/reporting/IcannHttpReporterTest.java
rename to javatests/google/registry/reporting/icann/IcannHttpReporterTest.java
index 1166354df..51d4d903e 100644
--- a/javatests/google/registry/reporting/IcannHttpReporterTest.java
+++ b/javatests/google/registry/reporting/icann/IcannHttpReporterTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.net.MediaType.CSV_UTF_8;
import static com.google.common.net.MediaType.PLAIN_TEXT_UTF_8;
@@ -40,7 +40,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/**
- * Unit tests for {@link google.registry.reporting.IcannHttpReporter}.
+ * Unit tests for {@link IcannHttpReporter}.
*/
@RunWith(JUnit4.class)
public class IcannHttpReporterTest {
diff --git a/javatests/google/registry/reporting/IcannReportingModuleTest.java b/javatests/google/registry/reporting/icann/IcannReportingModuleTest.java
similarity index 92%
rename from javatests/google/registry/reporting/IcannReportingModuleTest.java
rename to javatests/google/registry/reporting/icann/IcannReportingModuleTest.java
index acc633662..a67455d51 100644
--- a/javatests/google/registry/reporting/IcannReportingModuleTest.java
+++ b/javatests/google/registry/reporting/icann/IcannReportingModuleTest.java
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.JUnitBackports.expectThrows;
-import google.registry.reporting.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
import google.registry.request.HttpException.BadRequestException;
import java.util.Optional;
import org.joda.time.YearMonth;
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link google.registry.reporting.IcannReportingModule}. */
+/** Unit tests for {@link google.registry.reporting.icann.IcannReportingModule}. */
@RunWith(JUnit4.class)
public class IcannReportingModuleTest {
diff --git a/javatests/google/registry/reporting/IcannReportingStagerTest.java b/javatests/google/registry/reporting/icann/IcannReportingStagerTest.java
similarity index 97%
rename from javatests/google/registry/reporting/IcannReportingStagerTest.java
rename to javatests/google/registry/reporting/icann/IcannReportingStagerTest.java
index 7ea2c8f7d..ebddce986 100644
--- a/javatests/google/registry/reporting/IcannReportingStagerTest.java
+++ b/javatests/google/registry/reporting/icann/IcannReportingStagerTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.GcsTestingUtils.readGcsFile;
@@ -32,7 +32,7 @@ import google.registry.bigquery.BigqueryConnection;
import google.registry.bigquery.BigqueryConnection.DestinationTable;
import google.registry.bigquery.BigqueryUtils.TableType;
import google.registry.gcs.GcsUtils;
-import google.registry.reporting.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeResponse;
import java.util.concurrent.ExecutionException;
@@ -45,7 +45,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link google.registry.reporting.IcannReportingStager}. */
+/** Unit tests for {@link google.registry.reporting.icann.IcannReportingStager}. */
@RunWith(JUnit4.class)
public class IcannReportingStagerTest {
diff --git a/javatests/google/registry/reporting/IcannReportingStagingActionTest.java b/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
similarity index 96%
rename from javatests/google/registry/reporting/IcannReportingStagingActionTest.java
rename to javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
index da0580589..d676e2766 100644
--- a/javatests/google/registry/reporting/IcannReportingStagingActionTest.java
+++ b/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.JUnitBackports.expectThrows;
@@ -25,7 +25,7 @@ import static org.mockito.Mockito.when;
import com.google.common.collect.ImmutableList;
import google.registry.bigquery.BigqueryJobFailureException;
-import google.registry.reporting.IcannReportingModule.ReportType;
+import google.registry.reporting.icann.IcannReportingModule.ReportType;
import google.registry.testing.AppEngineRule;
import google.registry.testing.FakeClock;
import google.registry.testing.FakeResponse;
@@ -39,9 +39,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/**
- * Unit tests for {@link google.registry.reporting.IcannReportingStagingAction}.
- */
+/** Unit tests for {@link google.registry.reporting.icann.IcannReportingStagingAction}. */
@RunWith(JUnit4.class)
public class IcannReportingStagingActionTest {
diff --git a/javatests/google/registry/reporting/IcannReportingUploadActionTest.java b/javatests/google/registry/reporting/icann/IcannReportingUploadActionTest.java
similarity index 98%
rename from javatests/google/registry/reporting/IcannReportingUploadActionTest.java
rename to javatests/google/registry/reporting/icann/IcannReportingUploadActionTest.java
index 3fbffce27..bba7f02d9 100644
--- a/javatests/google/registry/reporting/IcannReportingUploadActionTest.java
+++ b/javatests/google/registry/reporting/icann/IcannReportingUploadActionTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.GcsTestingUtils.writeGcsFile;
@@ -40,7 +40,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link google.registry.reporting.IcannReportingUploadAction} */
+/** Unit tests for {@link google.registry.reporting.icann.IcannReportingUploadAction} */
@RunWith(JUnit4.class)
public class IcannReportingUploadActionTest {
diff --git a/javatests/google/registry/reporting/ReportingEmailUtilsTest.java b/javatests/google/registry/reporting/icann/ReportingEmailUtilsTest.java
similarity index 95%
rename from javatests/google/registry/reporting/ReportingEmailUtilsTest.java
rename to javatests/google/registry/reporting/icann/ReportingEmailUtilsTest.java
index 422af5549..36c28340a 100644
--- a/javatests/google/registry/reporting/ReportingEmailUtilsTest.java
+++ b/javatests/google/registry/reporting/icann/ReportingEmailUtilsTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
@@ -30,7 +30,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Unit tests for {@link ReportingEmailUtils}. */
+/** Unit tests for {@link google.registry.reporting.icann.ReportingEmailUtils}. */
@RunWith(JUnit4.class)
public class ReportingEmailUtilsTest {
private Message msg;
diff --git a/javatests/google/registry/reporting/ReportingTestData.java b/javatests/google/registry/reporting/icann/ReportingTestData.java
similarity index 96%
rename from javatests/google/registry/reporting/ReportingTestData.java
rename to javatests/google/registry/reporting/icann/ReportingTestData.java
index cbada6c50..96ccfbef8 100644
--- a/javatests/google/registry/reporting/ReportingTestData.java
+++ b/javatests/google/registry/reporting/icann/ReportingTestData.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import com.google.common.io.ByteSource;
import google.registry.testing.TestDataHelper;
diff --git a/javatests/google/registry/reporting/TransactionsReportingQueryBuilderTest.java b/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
similarity index 98%
rename from javatests/google/registry/reporting/TransactionsReportingQueryBuilderTest.java
rename to javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
index 5ddb8a01d..9c7ec7149 100644
--- a/javatests/google/registry/reporting/TransactionsReportingQueryBuilderTest.java
+++ b/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package google.registry.reporting;
+package google.registry.reporting.icann;
import static com.google.common.truth.Truth.assertThat;
diff --git a/javatests/google/registry/reporting/testdata/activity_report_aggregation_test.sql b/javatests/google/registry/reporting/icann/testdata/activity_report_aggregation_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/activity_report_aggregation_test.sql
rename to javatests/google/registry/reporting/icann/testdata/activity_report_aggregation_test.sql
diff --git a/javatests/google/registry/reporting/testdata/attempted_adds_test.sql b/javatests/google/registry/reporting/icann/testdata/attempted_adds_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/attempted_adds_test.sql
rename to javatests/google/registry/reporting/icann/testdata/attempted_adds_test.sql
diff --git a/javatests/google/registry/reporting/testdata/dns_counts_internal_test.sql b/javatests/google/registry/reporting/icann/testdata/dns_counts_internal_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/dns_counts_internal_test.sql
rename to javatests/google/registry/reporting/icann/testdata/dns_counts_internal_test.sql
diff --git a/javatests/google/registry/reporting/testdata/dns_counts_test.sql b/javatests/google/registry/reporting/icann/testdata/dns_counts_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/dns_counts_test.sql
rename to javatests/google/registry/reporting/icann/testdata/dns_counts_test.sql
diff --git a/javatests/google/registry/reporting/testdata/epp_metrics_test.sql b/javatests/google/registry/reporting/icann/testdata/epp_metrics_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/epp_metrics_test.sql
rename to javatests/google/registry/reporting/icann/testdata/epp_metrics_test.sql
diff --git a/javatests/google/registry/reporting/testdata/iirdea_bad.xml b/javatests/google/registry/reporting/icann/testdata/iirdea_bad.xml
similarity index 100%
rename from javatests/google/registry/reporting/testdata/iirdea_bad.xml
rename to javatests/google/registry/reporting/icann/testdata/iirdea_bad.xml
diff --git a/javatests/google/registry/reporting/testdata/iirdea_good.xml b/javatests/google/registry/reporting/icann/testdata/iirdea_good.xml
similarity index 100%
rename from javatests/google/registry/reporting/testdata/iirdea_good.xml
rename to javatests/google/registry/reporting/icann/testdata/iirdea_good.xml
diff --git a/javatests/google/registry/reporting/testdata/monthly_logs_test.sql b/javatests/google/registry/reporting/icann/testdata/monthly_logs_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/monthly_logs_test.sql
rename to javatests/google/registry/reporting/icann/testdata/monthly_logs_test.sql
diff --git a/javatests/google/registry/reporting/testdata/registrar_iana_id_test.sql b/javatests/google/registry/reporting/icann/testdata/registrar_iana_id_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/registrar_iana_id_test.sql
rename to javatests/google/registry/reporting/icann/testdata/registrar_iana_id_test.sql
diff --git a/javatests/google/registry/reporting/testdata/registrar_operating_status_test.sql b/javatests/google/registry/reporting/icann/testdata/registrar_operating_status_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/registrar_operating_status_test.sql
rename to javatests/google/registry/reporting/icann/testdata/registrar_operating_status_test.sql
diff --git a/javatests/google/registry/reporting/testdata/total_domains_test.sql b/javatests/google/registry/reporting/icann/testdata/total_domains_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/total_domains_test.sql
rename to javatests/google/registry/reporting/icann/testdata/total_domains_test.sql
diff --git a/javatests/google/registry/reporting/testdata/total_nameservers_test.sql b/javatests/google/registry/reporting/icann/testdata/total_nameservers_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/total_nameservers_test.sql
rename to javatests/google/registry/reporting/icann/testdata/total_nameservers_test.sql
diff --git a/javatests/google/registry/reporting/testdata/transaction_counts_test.sql b/javatests/google/registry/reporting/icann/testdata/transaction_counts_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/transaction_counts_test.sql
rename to javatests/google/registry/reporting/icann/testdata/transaction_counts_test.sql
diff --git a/javatests/google/registry/reporting/testdata/transaction_transfer_losing_test.sql b/javatests/google/registry/reporting/icann/testdata/transaction_transfer_losing_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/transaction_transfer_losing_test.sql
rename to javatests/google/registry/reporting/icann/testdata/transaction_transfer_losing_test.sql
diff --git a/javatests/google/registry/reporting/testdata/transactions_report_aggregation_test.sql b/javatests/google/registry/reporting/icann/testdata/transactions_report_aggregation_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/transactions_report_aggregation_test.sql
rename to javatests/google/registry/reporting/icann/testdata/transactions_report_aggregation_test.sql
diff --git a/javatests/google/registry/reporting/testdata/whois_counts_test.sql b/javatests/google/registry/reporting/icann/testdata/whois_counts_test.sql
similarity index 100%
rename from javatests/google/registry/reporting/testdata/whois_counts_test.sql
rename to javatests/google/registry/reporting/icann/testdata/whois_counts_test.sql