pgm: Explicitly list subpackage srcs in the pgm rule

Explicitly listing srcs rather than excluding srcs belonging to all
other rules makes it harder to forget to add other rules' srcs to the
exclude lists.

Change-Id: I39e82b7ff8520e41088fdde63a8ac04a2fabe2c7
This commit is contained in:
Dave Borowitz
2014-07-28 13:45:44 -07:00
parent 3a0463529a
commit 9b6bd0231f

View File

@@ -25,11 +25,9 @@ java_sources(
visibility = ['PUBLIC'],
)
INIT_SRCS = glob([SRCS + 'init/*.java'])
java_library(
name = 'init',
srcs = INIT_SRCS,
srcs = glob([SRCS + 'init/*.java']),
resources = glob([RSRCS + 'init/*']),
deps = [
':init-api',
@@ -59,11 +57,9 @@ java_library(
],
)
UTIL_SRCS = glob([SRCS + 'util/*.java'])
java_library(
name = 'util',
srcs = UTIL_SRCS,
srcs = glob([SRCS + 'util/*.java']),
deps = [
'//gerrit-common:server',
'//gerrit-extension-api:api',
@@ -87,8 +83,12 @@ java_library(
java_library(
name = 'pgm',
srcs = glob(
['src/main/java/**/*.java'],
excludes = INIT_API_SRCS + INIT_SRCS + UTIL_SRCS
[SRCS + n for n in [
'*.java',
# TODO(dborowitz): Split these into separate rules.
'http/**/*.java',
'shell/**/*.java',
]],
),
resources = glob([RSRCS + '*']),
deps = [