From 168be68cb6d7c653cf2978a72553e0b36c967479 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Mon, 21 Aug 2017 07:54:04 +0200 Subject: [PATCH] Dissolve gerrit-common top-level directory Change-Id: I5b64fed8bbff59b13247200ff0a3553509018281 --- gerrit-acceptance-framework/BUILD | 4 +- gerrit-acceptance-tests/BUILD | 4 +- gerrit-cache-h2/BUILD | 2 +- gerrit-gpg/BUILD | 2 +- gerrit-gwtui-common/BUILD | 2 +- gerrit-gwtui/BUILD | 2 +- gerrit-httpd/BUILD | 8 ++-- gerrit-index/BUILD | 2 +- gerrit-lucene/BUILD | 4 +- gerrit-oauth/BUILD | 2 +- gerrit-openid/BUILD | 4 +- gerrit-pgm/BUILD | 6 +-- gerrit-plugin-api/BUILD | 11 ++--- gerrit-plugin-gwtui/BUILD | 5 +-- gerrit-server/BUILD | 14 +++--- gerrit-sshd/BUILD | 4 +- gerrit-util-cli/BUILD | 4 +- .../com/google/gerrit/common}/BUILD | 45 +++---------------- .../com/google/gerrit/common/Common.gwt.xml | 0 .../com/google/gerrit/common/Die.java | 0 .../com/google/gerrit/common/FileUtil.java | 0 .../com/google/gerrit/common/FormatUtil.java | 0 .../com/google/gerrit/common/IoUtil.java | 0 .../com/google/gerrit/common/Nullable.java | 0 .../com/google/gerrit/common/PageLinks.java | 0 .../com/google/gerrit/common/PluginData.java | 0 .../gerrit/common/ProjectAccessUtil.java | 0 .../com/google/gerrit/common/ProjectUtil.java | 0 .../google/gerrit/common/RawInputUtil.java | 0 .../gerrit/common/SiteLibraryLoaderUtil.java | 0 .../com/google/gerrit/common/TimeUtil.java | 0 .../com/google/gerrit/common/audit/Audit.java | 0 .../gerrit/common/auth/SignInRequired.java | 0 .../gerrit/common/auth/openid/OpenIdUrls.java | 0 .../gerrit/common/data/AccessSection.java | 0 .../gerrit/common/data/AccountInfo.java | 0 .../gerrit/common/data/AgreementInfo.java | 0 .../google/gerrit/common/data/Capable.java | 0 .../gerrit/common/data/CommentDetail.java | 0 .../common/data/ContributorAgreement.java | 0 .../common/data/FilenameComparator.java | 0 .../common/data/GarbageCollectionResult.java | 0 .../google/gerrit/common/data/GitwebType.java | 0 .../gerrit/common/data/GlobalCapability.java | 0 .../gerrit/common/data/GroupDescription.java | 0 .../gerrit/common/data/GroupDetail.java | 37 +++++++++++++++ .../google/gerrit/common/data/GroupInfo.java | 0 .../gerrit/common/data/GroupReference.java | 0 .../gerrit/common/data/HostPageData.java | 0 .../gerrit/common/data/LabelFunction.java | 0 .../google/gerrit/common/data/LabelType.java | 0 .../google/gerrit/common/data/LabelTypes.java | 0 .../google/gerrit/common/data/LabelValue.java | 0 .../common/data/ParameterizedString.java | 0 .../gerrit/common/data/PatchScript.java | 0 .../google/gerrit/common/data/Permission.java | 0 .../gerrit/common/data/PermissionRange.java | 0 .../gerrit/common/data/PermissionRule.java | 0 .../gerrit/common/data/ProjectAccess.java | 0 .../common/data/ProjectAdminService.java | 0 .../gerrit/common/data/RefConfigSection.java | 0 .../google/gerrit/common/data/SshHostKey.java | 0 .../gerrit/common/data/SubmitRecord.java | 0 .../gerrit/common/data/SubmitTypeRecord.java | 0 .../gerrit/common/data/SubscribeSection.java | 0 .../gerrit/common/data/SystemInfoService.java | 0 .../gerrit/common/data/WebLinkInfoCommon.java | 0 .../gerrit/common/errors/EmailException.java | 0 .../common/errors/InvalidNameException.java | 0 .../common/errors/InvalidQueryException.java | 0 .../common/errors/InvalidSshKeyException.java | 0 .../errors/NameAlreadyUsedException.java | 0 .../common/errors/NoSuchAccountException.java | 0 .../common/errors/NoSuchEntityException.java | 0 .../common/errors/NoSuchGroupException.java | 0 .../common/errors/NotSignedInException.java | 0 .../errors/PermissionDeniedException.java | 0 .../errors/UpdateParentFailedException.java | 0 java/com/google/gerrit/extensions/BUILD | 2 +- .../google/gerrit/common/AutoValueTest.java | 0 javatests/com/google/gerrit/common/BUILD | 26 +++++++++++ .../common/data/EncodePathSeparatorTest.java | 0 .../common/data/FilenameComparatorTest.java | 0 .../common/data/ParameterizedStringTest.java | 0 tools/coverage.sh | 2 +- 85 files changed, 111 insertions(+), 81 deletions(-) rename {gerrit-common => java/com/google/gerrit/common}/BUILD (55%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/Common.gwt.xml (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/Die.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/FileUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/FormatUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/IoUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/Nullable.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/PageLinks.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/PluginData.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/ProjectAccessUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/ProjectUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/RawInputUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/SiteLibraryLoaderUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/TimeUtil.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/audit/Audit.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/auth/SignInRequired.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/auth/openid/OpenIdUrls.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/AccessSection.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/AccountInfo.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/AgreementInfo.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/Capable.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/CommentDetail.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/ContributorAgreement.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/FilenameComparator.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GarbageCollectionResult.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GitwebType.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GlobalCapability.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GroupDescription.java (100%) create mode 100644 java/com/google/gerrit/common/data/GroupDetail.java rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GroupInfo.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/GroupReference.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/HostPageData.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/LabelFunction.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/LabelType.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/LabelTypes.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/LabelValue.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/ParameterizedString.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/PatchScript.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/Permission.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/PermissionRange.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/PermissionRule.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/ProjectAccess.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/ProjectAdminService.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/RefConfigSection.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/SshHostKey.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/SubmitRecord.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/SubmitTypeRecord.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/SubscribeSection.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/SystemInfoService.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/data/WebLinkInfoCommon.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/EmailException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/InvalidNameException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/InvalidQueryException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/InvalidSshKeyException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/NameAlreadyUsedException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/NoSuchAccountException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/NoSuchEntityException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/NoSuchGroupException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/NotSignedInException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/PermissionDeniedException.java (100%) rename {gerrit-common/src/main/java => java}/com/google/gerrit/common/errors/UpdateParentFailedException.java (100%) rename {gerrit-common/src/test/java => javatests}/com/google/gerrit/common/AutoValueTest.java (100%) create mode 100644 javatests/com/google/gerrit/common/BUILD rename {gerrit-common/src/test/java => javatests}/com/google/gerrit/common/data/EncodePathSeparatorTest.java (100%) rename {gerrit-common/src/test/java => javatests}/com/google/gerrit/common/data/FilenameComparatorTest.java (100%) rename {gerrit-common/src/test/java => javatests}/com/google/gerrit/common/data/ParameterizedStringTest.java (100%) diff --git a/gerrit-acceptance-framework/BUILD b/gerrit-acceptance-framework/BUILD index bce23bdf21..60dfe86347 100644 --- a/gerrit-acceptance-framework/BUILD +++ b/gerrit-acceptance-framework/BUILD @@ -9,8 +9,8 @@ SRCS = glob( ) PROVIDED = [ - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//gerrit-httpd:httpd", "//gerrit-index:index", diff --git a/gerrit-acceptance-tests/BUILD b/gerrit-acceptance-tests/BUILD index d05a2d439e..e0bccac8ac 100644 --- a/gerrit-acceptance-tests/BUILD +++ b/gerrit-acceptance-tests/BUILD @@ -8,8 +8,6 @@ java_library( visibility = ["//visibility:public"], exports = [ "//gerrit-acceptance-framework:lib", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-gpg:testutil", "//gerrit-httpd:httpd", "//gerrit-launcher:launcher", @@ -22,6 +20,8 @@ java_library( "//gerrit-server:server", "//gerrit-server:testutil", "//gerrit-sshd:sshd", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/extensions/common/testing:common-test-util", "//java/com/google/gerrit/extensions/restapi/testing:restapi-test-util", diff --git a/gerrit-cache-h2/BUILD b/gerrit-cache-h2/BUILD index 4a3b32c4f5..cd3b076049 100644 --- a/gerrit-cache-h2/BUILD +++ b/gerrit-cache-h2/BUILD @@ -5,8 +5,8 @@ java_library( srcs = glob(["src/main/java/**/*.java"]), visibility = ["//visibility:public"], deps = [ - "//gerrit-common:server", "//gerrit-server:server", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//lib:guava", "//lib:h2", diff --git a/gerrit-gpg/BUILD b/gerrit-gpg/BUILD index 4d1ebb30c3..aa63fda7fd 100644 --- a/gerrit-gpg/BUILD +++ b/gerrit-gpg/BUILD @@ -1,7 +1,7 @@ load("//tools/bzl:junit.bzl", "junit_tests") DEPS = [ - "//gerrit-common:server", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//gerrit-server:server", diff --git a/gerrit-gwtui-common/BUILD b/gerrit-gwtui-common/BUILD index d3bee50cbf..46019ab6d8 100644 --- a/gerrit-gwtui-common/BUILD +++ b/gerrit-gwtui-common/BUILD @@ -3,7 +3,7 @@ load("//tools/bzl:junit.bzl", "junit_tests") load("//tools/bzl:gwt.bzl", "gwt_module") EXPORTED_DEPS = [ - "//gerrit-common:client", + "//java/com/google/gerrit/common:client", "//java/com/google/gwtexpui/clippy", "//java/com/google/gwtexpui/globalkey", "//java/com/google/gwtexpui/progress", diff --git a/gerrit-gwtui/BUILD b/gerrit-gwtui/BUILD index 77961cf0ac..a6c97630d6 100644 --- a/gerrit-gwtui/BUILD +++ b/gerrit-gwtui/BUILD @@ -31,7 +31,7 @@ junit_tests( visibility = ["//visibility:public"], deps = [ ":ui_module", - "//gerrit-common:client", + "//java/com/google/gerrit/common:client", "//java/com/google/gerrit/extensions:client", "//lib:junit", "//lib:truth", diff --git a/gerrit-httpd/BUILD b/gerrit-httpd/BUILD index 80f66cf034..180391f64f 100644 --- a/gerrit-httpd/BUILD +++ b/gerrit-httpd/BUILD @@ -16,8 +16,6 @@ java_library( resources = RESOURCES, visibility = ["//visibility:public"], deps = [ - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-index:query_exception", "//gerrit-launcher:launcher", "//gerrit-server:metrics", @@ -25,6 +23,8 @@ java_library( "//gerrit-server:server", "//gerrit-util-cli:cli", "//gerrit-util-http:http", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/prettify:server", "//java/com/google/gerrit/reviewdb:server", @@ -57,11 +57,11 @@ junit_tests( srcs = glob(["src/test/java/**/*.java"]), deps = [ ":httpd", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-server:server", "//gerrit-util-http:http", "//gerrit-util-http:testutil", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//lib:gson", diff --git a/gerrit-index/BUILD b/gerrit-index/BUILD index 470574c81e..8e6744a0c6 100644 --- a/gerrit-index/BUILD +++ b/gerrit-index/BUILD @@ -47,8 +47,8 @@ java_library( deps = [ ":query_exception", ":query_parser", - "//gerrit-common:annotations", "//gerrit-server:metrics", + "//java/com/google/gerrit/common:annotations", "//java/com/google/gerrit/extensions:api", "//lib:guava", "//lib:gwtjsonrpc", diff --git a/gerrit-lucene/BUILD b/gerrit-lucene/BUILD index a19bb1af92..1434b0d3b5 100644 --- a/gerrit-lucene/BUILD +++ b/gerrit-lucene/BUILD @@ -26,11 +26,11 @@ java_library( visibility = ["//visibility:public"], deps = [ ":query_builder", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-index:index", "//gerrit-index:query_exception", "//gerrit-server:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//lib:guava", diff --git a/gerrit-oauth/BUILD b/gerrit-oauth/BUILD index 4b04b21217..1ed0b7594e 100644 --- a/gerrit-oauth/BUILD +++ b/gerrit-oauth/BUILD @@ -10,9 +10,9 @@ java_library( resources = RESOURCES, visibility = ["//visibility:public"], deps = [ - "//gerrit-common:annotations", "//gerrit-httpd:httpd", "//gerrit-server:server", + "//java/com/google/gerrit/common:annotations", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//lib:gson", diff --git a/gerrit-openid/BUILD b/gerrit-openid/BUILD index edd5da0584..30af02e7b0 100644 --- a/gerrit-openid/BUILD +++ b/gerrit-openid/BUILD @@ -5,8 +5,8 @@ java_library( visibility = ["//visibility:public"], deps = [ # We want all these deps to be provided_deps - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gwtexpui/server", "//gerrit-httpd:httpd", diff --git a/gerrit-pgm/BUILD b/gerrit-pgm/BUILD index c4da9cbcc7..f16f650f08 100644 --- a/gerrit-pgm/BUILD +++ b/gerrit-pgm/BUILD @@ -9,8 +9,8 @@ RSRCS = "src/main/resources/com/google/gerrit/pgm/" INIT_API_SRCS = glob([SRCS + "init/api/*.java"]) BASE_JETTY_DEPS = [ - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gwtexpui/linker:server", "//java/com/google/gwtexpui/server", @@ -162,8 +162,8 @@ junit_tests( ":init", ":init-api", ":pgm", - "//gerrit-common:server", "//gerrit-server:server", + "//java/com/google/gerrit/common:server", "//lib:guava", "//lib:junit", "//lib:truth", diff --git a/gerrit-plugin-api/BUILD b/gerrit-plugin-api/BUILD index cd961e286c..319609beff 100644 --- a/gerrit-plugin-api/BUILD +++ b/gerrit-plugin-api/BUILD @@ -9,8 +9,8 @@ EXPORTS = [ "//gerrit-index:index", "//gerrit-index:query_exception", "//gerrit-index:query_parser", - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gwtexpui/server", "//gerrit-server:metrics", @@ -75,13 +75,14 @@ java_binary( main_class = "Dummy", visibility = ["//visibility:public"], runtime_deps = [ - "//gerrit-common:libannotations-src.jar", "//gerrit-httpd:libhttpd-src.jar", "//gerrit-index:libquery_exception-src.jar", "//gerrit-index:libquery_parser-src.jar", "//gerrit-pgm:libinit-api-src.jar", "//gerrit-server:libserver-src.jar", "//gerrit-sshd:libsshd-src.jar", + "//java/com/google/gerrit/common:libannotations-src.jar", + "//java/com/google/gerrit/common:libserver-src.jar", "//java/com/google/gerrit/extensions:libapi-src.jar", "//java/com/google/gerrit/reviewdb:libserver-src.jar", "//java/com/google/gwtexpui/server:libserver-src.jar", @@ -95,8 +96,8 @@ java_doc( libs = PLUGIN_API + [ "//gerrit-index:query_exception", "//gerrit-index:query_parser", - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gwtexpui/server", "//java/com/google/gerrit/reviewdb:server", diff --git a/gerrit-plugin-gwtui/BUILD b/gerrit-plugin-gwtui/BUILD index 14069ba6ef..3f066c7c69 100644 --- a/gerrit-plugin-gwtui/BUILD +++ b/gerrit-plugin-gwtui/BUILD @@ -21,10 +21,9 @@ java_library2( exported_deps = ["//gerrit-gwtui-common:client-lib"], resources = glob(["src/main/**/*"]), deps = DEPS + [ - "//gerrit-common:libclient-src.jar", - "//java/com/google/gerrit/extensions:libclient-src.jar", "//java/org/eclipse/jgit:libclient-src.jar", "//java/org/eclipse/jgit:libEdit-src.jar", + "//java/com/google/gerrit/common:libclient-src.jar", "//java/com/google/gwtexpui/clippy:libclippy-src.jar", "//java/com/google/gwtexpui/globalkey:libglobalkey-src.jar", "//java/com/google/gwtexpui/progress:libprogress-src.jar", @@ -70,7 +69,7 @@ java_doc( "//lib:gwtorm_client", "//lib/gwt:dev", "//gerrit-gwtui-common:client-lib", - "//gerrit-common:client", + "//java/com/google/gerrit/common:client", "//java/com/google/gerrit/reviewdb:client", ], pkgs = [ diff --git a/gerrit-server/BUILD b/gerrit-server/BUILD index 57e7a6a1ad..a7e7c2338b 100644 --- a/gerrit-server/BUILD +++ b/gerrit-server/BUILD @@ -40,13 +40,13 @@ java_library( deps = [ ":constants", ":metrics", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-index:index", "//gerrit-index:query_exception", "//gerrit-patch-commonsnet:commons-net", "//gerrit-util-cli:cli", "//gerrit-util-ssl:ssl", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/prettify:server", "//java/com/google/gerrit/reviewdb:server", @@ -123,9 +123,9 @@ java_library( visibility = ["//visibility:public"], deps = [ ":server", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-util-cli:cli", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//lib:args4j", @@ -155,8 +155,8 @@ TESTUTIL_DEPS = [ ":metrics", ":module", ":server", - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//gerrit-cache-h2:cache-h2", "//java/com/google/gerrit/extensions:api", "//gerrit-gpg:gpg", @@ -237,7 +237,7 @@ java_library( deps = [ ":server", ":testutil", - "//gerrit-common:server", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//lib:guava", "//lib:junit", diff --git a/gerrit-sshd/BUILD b/gerrit-sshd/BUILD index 3d87fbf217..47bd13899f 100644 --- a/gerrit-sshd/BUILD +++ b/gerrit-sshd/BUILD @@ -8,13 +8,13 @@ java_library( visibility = ["//visibility:public"], deps = [ "//gerrit-cache-h2:cache-h2", - "//gerrit-common:annotations", - "//gerrit-common:server", "//gerrit-lucene:lucene", "//gerrit-server:metrics", "//gerrit-server:receive", "//gerrit-server:server", "//gerrit-util-cli:cli", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/reviewdb:server", "//java/org/eclipse/jgit:server", diff --git a/gerrit-util-cli/BUILD b/gerrit-util-cli/BUILD index bb282f467f..13d327c05f 100644 --- a/gerrit-util-cli/BUILD +++ b/gerrit-util-cli/BUILD @@ -3,8 +3,8 @@ java_library( srcs = glob(["src/main/java/**/*.java"]), visibility = ["//visibility:public"], deps = [ - "//gerrit-common:annotations", - "//gerrit-common:server", + "//java/com/google/gerrit/common:annotations", + "//java/com/google/gerrit/common:server", "//lib:args4j", "//lib:guava", "//lib/guice", diff --git a/gerrit-common/BUILD b/java/com/google/gerrit/common/BUILD similarity index 55% rename from gerrit-common/BUILD rename to java/com/google/gerrit/common/BUILD index 662c3e1a1e..0755f796d1 100644 --- a/gerrit-common/BUILD +++ b/java/com/google/gerrit/common/BUILD @@ -1,15 +1,9 @@ load("//tools/bzl:gwt.bzl", "gwt_module") -load("//tools/bzl:junit.bzl", "junit_tests") - -SRC = "src/main/java/com/google/gerrit/" ANNOTATIONS = [ - SRC + x - for x in [ - "common/Nullable.java", - "common/audit/Audit.java", - "common/auth/SignInRequired.java", - ] + "Nullable.java", + "audit/Audit.java", + "auth/SignInRequired.java", ] java_library( @@ -20,7 +14,7 @@ java_library( gwt_module( name = "client", - srcs = glob([SRC + "common/**/*.java"]), + srcs = glob(["**/*.java"]), exported_deps = [ "//java/com/google/gerrit/extensions:api", "//java/com/google/gerrit/prettify:client", @@ -30,14 +24,14 @@ gwt_module( "//lib/jgit/org.eclipse.jgit:jgit", "//lib/log:api", ], - gwt_xml = SRC + "common/Common.gwt.xml", + gwt_xml = "Common.gwt.xml", visibility = ["//visibility:public"], ) java_library( name = "server", srcs = glob( - [SRC + "common/**/*.java"], + ["**/*.java"], exclude = ANNOTATIONS, ), visibility = ["//visibility:public"], @@ -55,30 +49,3 @@ java_library( "//lib/log:api", ], ) - -TEST = "src/test/java/com/google/gerrit/common/" - -AUTO_VALUE_TEST_SRCS = [TEST + "AutoValueTest.java"] - -junit_tests( - name = "client_tests", - srcs = glob( - ["src/test/java/**/*.java"], - exclude = AUTO_VALUE_TEST_SRCS, - ), - deps = [ - ":client", - "//lib:guava", - "//lib:junit", - "//lib:truth", - ], -) - -junit_tests( - name = "auto_value_tests", - srcs = AUTO_VALUE_TEST_SRCS, - deps = [ - "//lib:truth", - "//lib/auto:auto-value", - ], -) diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/Common.gwt.xml b/java/com/google/gerrit/common/Common.gwt.xml similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/Common.gwt.xml rename to java/com/google/gerrit/common/Common.gwt.xml diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/Die.java b/java/com/google/gerrit/common/Die.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/Die.java rename to java/com/google/gerrit/common/Die.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/FileUtil.java b/java/com/google/gerrit/common/FileUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/FileUtil.java rename to java/com/google/gerrit/common/FileUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/FormatUtil.java b/java/com/google/gerrit/common/FormatUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/FormatUtil.java rename to java/com/google/gerrit/common/FormatUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java b/java/com/google/gerrit/common/IoUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java rename to java/com/google/gerrit/common/IoUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/Nullable.java b/java/com/google/gerrit/common/Nullable.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/Nullable.java rename to java/com/google/gerrit/common/Nullable.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/PageLinks.java b/java/com/google/gerrit/common/PageLinks.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/PageLinks.java rename to java/com/google/gerrit/common/PageLinks.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/PluginData.java b/java/com/google/gerrit/common/PluginData.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/PluginData.java rename to java/com/google/gerrit/common/PluginData.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/ProjectAccessUtil.java b/java/com/google/gerrit/common/ProjectAccessUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/ProjectAccessUtil.java rename to java/com/google/gerrit/common/ProjectAccessUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/ProjectUtil.java b/java/com/google/gerrit/common/ProjectUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/ProjectUtil.java rename to java/com/google/gerrit/common/ProjectUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/RawInputUtil.java b/java/com/google/gerrit/common/RawInputUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/RawInputUtil.java rename to java/com/google/gerrit/common/RawInputUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/SiteLibraryLoaderUtil.java b/java/com/google/gerrit/common/SiteLibraryLoaderUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/SiteLibraryLoaderUtil.java rename to java/com/google/gerrit/common/SiteLibraryLoaderUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/TimeUtil.java b/java/com/google/gerrit/common/TimeUtil.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/TimeUtil.java rename to java/com/google/gerrit/common/TimeUtil.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/audit/Audit.java b/java/com/google/gerrit/common/audit/Audit.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/audit/Audit.java rename to java/com/google/gerrit/common/audit/Audit.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/auth/SignInRequired.java b/java/com/google/gerrit/common/auth/SignInRequired.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/auth/SignInRequired.java rename to java/com/google/gerrit/common/auth/SignInRequired.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java b/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/auth/openid/OpenIdUrls.java rename to java/com/google/gerrit/common/auth/openid/OpenIdUrls.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java b/java/com/google/gerrit/common/data/AccessSection.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/AccessSection.java rename to java/com/google/gerrit/common/data/AccessSection.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/AccountInfo.java b/java/com/google/gerrit/common/data/AccountInfo.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/AccountInfo.java rename to java/com/google/gerrit/common/data/AccountInfo.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/AgreementInfo.java b/java/com/google/gerrit/common/data/AgreementInfo.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/AgreementInfo.java rename to java/com/google/gerrit/common/data/AgreementInfo.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/Capable.java b/java/com/google/gerrit/common/data/Capable.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/Capable.java rename to java/com/google/gerrit/common/data/Capable.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/CommentDetail.java b/java/com/google/gerrit/common/data/CommentDetail.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/CommentDetail.java rename to java/com/google/gerrit/common/data/CommentDetail.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ContributorAgreement.java b/java/com/google/gerrit/common/data/ContributorAgreement.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/ContributorAgreement.java rename to java/com/google/gerrit/common/data/ContributorAgreement.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/FilenameComparator.java b/java/com/google/gerrit/common/data/FilenameComparator.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/FilenameComparator.java rename to java/com/google/gerrit/common/data/FilenameComparator.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GarbageCollectionResult.java b/java/com/google/gerrit/common/data/GarbageCollectionResult.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GarbageCollectionResult.java rename to java/com/google/gerrit/common/data/GarbageCollectionResult.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GitwebType.java b/java/com/google/gerrit/common/data/GitwebType.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GitwebType.java rename to java/com/google/gerrit/common/data/GitwebType.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GlobalCapability.java b/java/com/google/gerrit/common/data/GlobalCapability.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GlobalCapability.java rename to java/com/google/gerrit/common/data/GlobalCapability.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupDescription.java b/java/com/google/gerrit/common/data/GroupDescription.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GroupDescription.java rename to java/com/google/gerrit/common/data/GroupDescription.java diff --git a/java/com/google/gerrit/common/data/GroupDetail.java b/java/com/google/gerrit/common/data/GroupDetail.java new file mode 100644 index 0000000000..1ac06dbfe8 --- /dev/null +++ b/java/com/google/gerrit/common/data/GroupDetail.java @@ -0,0 +1,37 @@ +// Copyright (C) 2008 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.google.gerrit.common.data; + +import com.google.gerrit.reviewdb.client.Account; +import com.google.gerrit.reviewdb.client.AccountGroup; +import java.util.Set; + +public class GroupDetail { + private Set members; + private Set includes; + + public GroupDetail(Set members, Set includes) { + this.members = members; + this.includes = includes; + } + + public Set getMembers() { + return members; + } + + public Set getIncludes() { + return includes; + } +} diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java b/java/com/google/gerrit/common/data/GroupInfo.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GroupInfo.java rename to java/com/google/gerrit/common/data/GroupInfo.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/GroupReference.java b/java/com/google/gerrit/common/data/GroupReference.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/GroupReference.java rename to java/com/google/gerrit/common/data/GroupReference.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java b/java/com/google/gerrit/common/data/HostPageData.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/HostPageData.java rename to java/com/google/gerrit/common/data/HostPageData.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/LabelFunction.java b/java/com/google/gerrit/common/data/LabelFunction.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/LabelFunction.java rename to java/com/google/gerrit/common/data/LabelFunction.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/LabelType.java b/java/com/google/gerrit/common/data/LabelType.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/LabelType.java rename to java/com/google/gerrit/common/data/LabelType.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/LabelTypes.java b/java/com/google/gerrit/common/data/LabelTypes.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/LabelTypes.java rename to java/com/google/gerrit/common/data/LabelTypes.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/LabelValue.java b/java/com/google/gerrit/common/data/LabelValue.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/LabelValue.java rename to java/com/google/gerrit/common/data/LabelValue.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java b/java/com/google/gerrit/common/data/ParameterizedString.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java rename to java/com/google/gerrit/common/data/ParameterizedString.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/PatchScript.java b/java/com/google/gerrit/common/data/PatchScript.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/PatchScript.java rename to java/com/google/gerrit/common/data/PatchScript.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java b/java/com/google/gerrit/common/data/Permission.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java rename to java/com/google/gerrit/common/data/Permission.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRange.java b/java/com/google/gerrit/common/data/PermissionRange.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRange.java rename to java/com/google/gerrit/common/data/PermissionRange.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java b/java/com/google/gerrit/common/data/PermissionRule.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java rename to java/com/google/gerrit/common/data/PermissionRule.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ProjectAccess.java b/java/com/google/gerrit/common/data/ProjectAccess.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/ProjectAccess.java rename to java/com/google/gerrit/common/data/ProjectAccess.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ProjectAdminService.java b/java/com/google/gerrit/common/data/ProjectAdminService.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/ProjectAdminService.java rename to java/com/google/gerrit/common/data/ProjectAdminService.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/RefConfigSection.java b/java/com/google/gerrit/common/data/RefConfigSection.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/RefConfigSection.java rename to java/com/google/gerrit/common/data/RefConfigSection.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SshHostKey.java b/java/com/google/gerrit/common/data/SshHostKey.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/SshHostKey.java rename to java/com/google/gerrit/common/data/SshHostKey.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SubmitRecord.java b/java/com/google/gerrit/common/data/SubmitRecord.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/SubmitRecord.java rename to java/com/google/gerrit/common/data/SubmitRecord.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SubmitTypeRecord.java b/java/com/google/gerrit/common/data/SubmitTypeRecord.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/SubmitTypeRecord.java rename to java/com/google/gerrit/common/data/SubmitTypeRecord.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SubscribeSection.java b/java/com/google/gerrit/common/data/SubscribeSection.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/SubscribeSection.java rename to java/com/google/gerrit/common/data/SubscribeSection.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/SystemInfoService.java b/java/com/google/gerrit/common/data/SystemInfoService.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/SystemInfoService.java rename to java/com/google/gerrit/common/data/SystemInfoService.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/WebLinkInfoCommon.java b/java/com/google/gerrit/common/data/WebLinkInfoCommon.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/data/WebLinkInfoCommon.java rename to java/com/google/gerrit/common/data/WebLinkInfoCommon.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/EmailException.java b/java/com/google/gerrit/common/errors/EmailException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/EmailException.java rename to java/com/google/gerrit/common/errors/EmailException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidNameException.java b/java/com/google/gerrit/common/errors/InvalidNameException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidNameException.java rename to java/com/google/gerrit/common/errors/InvalidNameException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidQueryException.java b/java/com/google/gerrit/common/errors/InvalidQueryException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidQueryException.java rename to java/com/google/gerrit/common/errors/InvalidQueryException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidSshKeyException.java b/java/com/google/gerrit/common/errors/InvalidSshKeyException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/InvalidSshKeyException.java rename to java/com/google/gerrit/common/errors/InvalidSshKeyException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java b/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/NameAlreadyUsedException.java rename to java/com/google/gerrit/common/errors/NameAlreadyUsedException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchAccountException.java b/java/com/google/gerrit/common/errors/NoSuchAccountException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchAccountException.java rename to java/com/google/gerrit/common/errors/NoSuchAccountException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchEntityException.java b/java/com/google/gerrit/common/errors/NoSuchEntityException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchEntityException.java rename to java/com/google/gerrit/common/errors/NoSuchEntityException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchGroupException.java b/java/com/google/gerrit/common/errors/NoSuchGroupException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/NoSuchGroupException.java rename to java/com/google/gerrit/common/errors/NoSuchGroupException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/NotSignedInException.java b/java/com/google/gerrit/common/errors/NotSignedInException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/NotSignedInException.java rename to java/com/google/gerrit/common/errors/NotSignedInException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/PermissionDeniedException.java b/java/com/google/gerrit/common/errors/PermissionDeniedException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/PermissionDeniedException.java rename to java/com/google/gerrit/common/errors/PermissionDeniedException.java diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/errors/UpdateParentFailedException.java b/java/com/google/gerrit/common/errors/UpdateParentFailedException.java similarity index 100% rename from gerrit-common/src/main/java/com/google/gerrit/common/errors/UpdateParentFailedException.java rename to java/com/google/gerrit/common/errors/UpdateParentFailedException.java diff --git a/java/com/google/gerrit/extensions/BUILD b/java/com/google/gerrit/extensions/BUILD index dfd2390dec..ad1b149960 100644 --- a/java/com/google/gerrit/extensions/BUILD +++ b/java/com/google/gerrit/extensions/BUILD @@ -39,7 +39,7 @@ java_library( srcs = glob(["**/*.java"]), visibility = ["//visibility:public"], deps = [ - "//gerrit-common:annotations", + "//java/com/google/gerrit/common:annotations", "//lib:guava", "//lib/guice", "//lib/guice:guice-assistedinject", diff --git a/gerrit-common/src/test/java/com/google/gerrit/common/AutoValueTest.java b/javatests/com/google/gerrit/common/AutoValueTest.java similarity index 100% rename from gerrit-common/src/test/java/com/google/gerrit/common/AutoValueTest.java rename to javatests/com/google/gerrit/common/AutoValueTest.java diff --git a/javatests/com/google/gerrit/common/BUILD b/javatests/com/google/gerrit/common/BUILD new file mode 100644 index 0000000000..64a2a468b3 --- /dev/null +++ b/javatests/com/google/gerrit/common/BUILD @@ -0,0 +1,26 @@ +load("//tools/bzl:junit.bzl", "junit_tests") + +AUTO_VALUE_TEST_SRCS = ["AutoValueTest.java"] + +junit_tests( + name = "client_tests", + srcs = glob( + ["**/*.java"], + exclude = AUTO_VALUE_TEST_SRCS, + ), + deps = [ + "//java/com/google/gerrit/common:client", + "//lib:guava", + "//lib:junit", + "//lib:truth", + ], +) + +junit_tests( + name = "auto_value_tests", + srcs = AUTO_VALUE_TEST_SRCS, + deps = [ + "//lib:truth", + "//lib/auto:auto-value", + ], +) diff --git a/gerrit-common/src/test/java/com/google/gerrit/common/data/EncodePathSeparatorTest.java b/javatests/com/google/gerrit/common/data/EncodePathSeparatorTest.java similarity index 100% rename from gerrit-common/src/test/java/com/google/gerrit/common/data/EncodePathSeparatorTest.java rename to javatests/com/google/gerrit/common/data/EncodePathSeparatorTest.java diff --git a/gerrit-common/src/test/java/com/google/gerrit/common/data/FilenameComparatorTest.java b/javatests/com/google/gerrit/common/data/FilenameComparatorTest.java similarity index 100% rename from gerrit-common/src/test/java/com/google/gerrit/common/data/FilenameComparatorTest.java rename to javatests/com/google/gerrit/common/data/FilenameComparatorTest.java diff --git a/gerrit-common/src/test/java/com/google/gerrit/common/data/ParameterizedStringTest.java b/javatests/com/google/gerrit/common/data/ParameterizedStringTest.java similarity index 100% rename from gerrit-common/src/test/java/com/google/gerrit/common/data/ParameterizedStringTest.java rename to javatests/com/google/gerrit/common/data/ParameterizedStringTest.java diff --git a/tools/coverage.sh b/tools/coverage.sh index 8fa979fcd3..22b40d8f6d 100755 --- a/tools/coverage.sh +++ b/tools/coverage.sh @@ -22,7 +22,7 @@ echo "Running 'bazel coverage'; this may take a while" # coverage is expensive to run; use --jobs=2 to avoid overloading the # machine. -bazel coverage -k --jobs=${COVERAGE_CPUS:-2} -- ... -//gerrit-common:auto_value_tests +bazel coverage -k --jobs=${COVERAGE_CPUS:-2} -- ... -//javatests/com/google/gerrit/common:auto_value_tests # The coverage data contains filenames relative to the Java root, and # genhtml has no logic to search these elsewhere. Workaround this