Dissolve gerrit-common top-level directory

Change-Id: I5b64fed8bbff59b13247200ff0a3553509018281
This commit is contained in:
David Ostrovsky 2017-08-21 07:54:04 +02:00 committed by Dave Borowitz
parent 71317baa43
commit 168be68cb6
85 changed files with 111 additions and 81 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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 = [

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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",
],
)

View File

@ -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<Account.Id> members;
private Set<AccountGroup.UUID> includes;
public GroupDetail(Set<Account.Id> members, Set<AccountGroup.UUID> includes) {
this.members = members;
this.includes = includes;
}
public Set<Account.Id> getMembers() {
return members;
}
public Set<AccountGroup.UUID> getIncludes() {
return includes;
}
}

View File

@ -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",

View File

@ -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",
],
)

View File

@ -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