Move gerrit-server/prolog sources to top-level prolog directory
The current layout of having gerrit-* directories with separate java source trees dates back to the bad old days of Maven, when this specific layout was necessary to decompose the build into separate pom.xml files. This is no longer a requiement. This series rearranges the directory structure and dissoves all top level directories and move all sources to the programming languages top level directories and differentiates between sources and tests. So that the gerrit-* will be dissolved and moved to new top level source directories: * java * javatests * prolog * resources Lib, polygerrit-ui and tools top-level directories stay the same. See this discussion on the mailing list: https://groups.google.com/d/topic/repo-discuss/TcvEkD-KO_c/discussion Change-Id: I3aff3a9787189cbfc79ec95537a32bed1584e444
This commit is contained in:

committed by
Dave Borowitz

parent
e365233ad9
commit
71f54a5508
@@ -47,7 +47,6 @@ java_library2(
|
||||
"//gerrit-pgm:daemon",
|
||||
"//gerrit-pgm:http-jetty",
|
||||
"//gerrit-pgm:util-nodep",
|
||||
"//gerrit-server:prolog-common",
|
||||
"//gerrit-server:testutil",
|
||||
"//lib:jimfs",
|
||||
"//lib:truth",
|
||||
@@ -60,6 +59,7 @@ java_library2(
|
||||
"//lib/jgit/org.eclipse.jgit.junit:junit",
|
||||
"//lib/log:impl_log4j",
|
||||
"//lib/log:log4j",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = PROVIDED + [
|
||||
|
@@ -20,7 +20,6 @@ java_library(
|
||||
"//gerrit-pgm:util",
|
||||
"//gerrit-reviewdb:server",
|
||||
"//gerrit-server:metrics",
|
||||
"//gerrit-server:prolog-common",
|
||||
"//gerrit-server:receive",
|
||||
"//gerrit-server:server",
|
||||
"//gerrit-server:testutil",
|
||||
@@ -44,5 +43,6 @@ java_library(
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/log:api",
|
||||
"//lib/mina:sshd",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
],
|
||||
)
|
||||
|
@@ -15,7 +15,7 @@ EXPORTS = [
|
||||
"//gerrit-gwtexpui:server",
|
||||
"//gerrit-server:metrics",
|
||||
"//gerrit-reviewdb:server",
|
||||
"//gerrit-server:prolog-common",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
"//lib/commons:dbcp",
|
||||
"//lib/commons:lang",
|
||||
"//lib/commons:lang3",
|
||||
|
@@ -1,4 +1,3 @@
|
||||
load("//lib/prolog:prolog.bzl", "prolog_cafe_library")
|
||||
load("//tools/bzl:junit.bzl", "junit_tests")
|
||||
|
||||
CONSTANTS_SRC = [
|
||||
@@ -27,13 +26,6 @@ java_library(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
prolog_cafe_library(
|
||||
name = "prolog-common",
|
||||
srcs = ["src/main/prolog/gerrit_common.pl"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":server"],
|
||||
)
|
||||
|
||||
# Giant kitchen-sink target.
|
||||
#
|
||||
# The only reason this hasn't been split up further is because we have too many
|
||||
@@ -260,7 +252,7 @@ junit_tests(
|
||||
srcs = PROLOG_TESTS,
|
||||
resources = glob(["src/test/resources/com/google/gerrit/rules/**/*"]),
|
||||
deps = TESTUTIL_DEPS + [
|
||||
":prolog-common",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
":prolog_test_case",
|
||||
":testutil",
|
||||
"//lib/prolog:runtime",
|
||||
@@ -277,7 +269,7 @@ java_library(
|
||||
srcs = QUERY_TESTS,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = TESTUTIL_DEPS + [
|
||||
":prolog-common",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
":testutil",
|
||||
],
|
||||
)
|
||||
@@ -288,7 +280,7 @@ junit_tests(
|
||||
srcs = QUERY_TESTS,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = TESTUTIL_DEPS + [
|
||||
":prolog-common",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
":testutil",
|
||||
],
|
||||
)
|
||||
@@ -304,7 +296,6 @@ junit_tests(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = TESTUTIL_DEPS + [
|
||||
":custom-truth-subjects",
|
||||
":prolog-common",
|
||||
":testutil",
|
||||
"//gerrit-index:query_exception",
|
||||
"//gerrit-patch-jgit:server",
|
||||
@@ -322,6 +313,7 @@ junit_tests(
|
||||
"//lib/guice:guice-assistedinject",
|
||||
"//lib/prolog:runtime",
|
||||
"//lib/commons:codec",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -19,7 +19,6 @@ java_library(
|
||||
"//gerrit-pgm:util",
|
||||
"//gerrit-reviewdb:server",
|
||||
"//gerrit-server:module",
|
||||
"//gerrit-server:prolog-common",
|
||||
"//gerrit-server:receive",
|
||||
"//gerrit-server:server",
|
||||
"//gerrit-sshd:sshd",
|
||||
@@ -30,6 +29,7 @@ java_library(
|
||||
"//lib/guice:guice-servlet",
|
||||
"//lib/jgit/org.eclipse.jgit:jgit",
|
||||
"//lib/log:api",
|
||||
"//prolog:gerrit-prolog-common",
|
||||
],
|
||||
)
|
||||
|
||||
|
8
prolog/BUILD
Normal file
8
prolog/BUILD
Normal file
@@ -0,0 +1,8 @@
|
||||
load("//lib/prolog:prolog.bzl", "prolog_cafe_library")
|
||||
|
||||
prolog_cafe_library(
|
||||
name = "gerrit-prolog-common",
|
||||
srcs = ["gerrit_common.pl"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//gerrit-server:server"],
|
||||
)
|
@@ -154,7 +154,7 @@ def gen_classpath(ext):
|
||||
src.add(m.group(1))
|
||||
# Exceptions: both source and lib
|
||||
if p.endswith('libquery_parser.jar') or \
|
||||
p.endswith('libprolog-common.jar'):
|
||||
p.endswith('prolog/libcommon.jar'):
|
||||
lib.add(p)
|
||||
# JGit dependency from external repository
|
||||
if 'gerrit-' not in p and 'jgit' in p:
|
||||
|
Reference in New Issue
Block a user