Bazel: Generate source dir for plugins in eclipse classpath
Change-Id: I9f71808b2ce6b29523143bcc98de4a5f50a5dc94
This commit is contained in:
parent
c04343eaad
commit
64e1aff339
@ -1,17 +1,9 @@
|
|||||||
load('//tools/bzl:genrule2.bzl', 'genrule2')
|
load('//tools/bzl:genrule2.bzl', 'genrule2')
|
||||||
|
load('//tools/bzl:plugins.bzl', 'CORE_PLUGINS')
|
||||||
CORE = [
|
|
||||||
'commit-message-length-validator',
|
|
||||||
'download-commands',
|
|
||||||
'hooks',
|
|
||||||
'replication',
|
|
||||||
'reviewnotes',
|
|
||||||
'singleusergroup'
|
|
||||||
]
|
|
||||||
|
|
||||||
genrule2(
|
genrule2(
|
||||||
name = 'core',
|
name = 'core',
|
||||||
srcs = ['//plugins/%s:%s.jar' % (n, n) for n in CORE],
|
srcs = ['//plugins/%s:%s.jar' % (n, n) for n in CORE_PLUGINS],
|
||||||
cmd = 'mkdir -p $$TMP/WEB-INF/plugins;' +
|
cmd = 'mkdir -p $$TMP/WEB-INF/plugins;' +
|
||||||
'for s in $(SRCS) ; do ' +
|
'for s in $(SRCS) ; do ' +
|
||||||
'ln -s $$ROOT/$$s $$TMP/WEB-INF/plugins;done;' +
|
'ln -s $$ROOT/$$s $$TMP/WEB-INF/plugins;done;' +
|
||||||
|
12
tools/bzl/plugins.bzl
Normal file
12
tools/bzl/plugins.bzl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
CORE_PLUGINS = [
|
||||||
|
'commit-message-length-validator',
|
||||||
|
'download-commands',
|
||||||
|
'hooks',
|
||||||
|
'replication',
|
||||||
|
'reviewnotes',
|
||||||
|
'singleusergroup',
|
||||||
|
]
|
||||||
|
|
||||||
|
CUSTOM_PLUGINS = [
|
||||||
|
'cookbook-plugin',
|
||||||
|
]
|
@ -1,5 +1,8 @@
|
|||||||
load('//tools/bzl:pkg_war.bzl', 'LIBS', 'PGMLIBS')
|
load('//tools/bzl:pkg_war.bzl', 'LIBS', 'PGMLIBS')
|
||||||
load('//tools/bzl:classpath.bzl', 'classpath_collector')
|
load('//tools/bzl:classpath.bzl', 'classpath_collector')
|
||||||
|
load('//tools/bzl:plugins.bzl',
|
||||||
|
'CORE_PLUGINS',
|
||||||
|
'CUSTOM_PLUGINS')
|
||||||
|
|
||||||
PROVIDED_DEPS = [
|
PROVIDED_DEPS = [
|
||||||
'//lib/bouncycastle:bcprov',
|
'//lib/bouncycastle:bcprov',
|
||||||
@ -48,10 +51,10 @@ java_library(
|
|||||||
|
|
||||||
classpath_collector(
|
classpath_collector(
|
||||||
name = 'main_classpath_collect',
|
name = 'main_classpath_collect',
|
||||||
deps = LIBS + PGMLIBS + DEPS + TEST_DEPS + PROVIDED_DEPS,
|
deps = LIBS + PGMLIBS + DEPS + TEST_DEPS + PROVIDED_DEPS +
|
||||||
|
['//plugins/%s:%s__plugin' % (n, n)
|
||||||
|
for n in CORE_PLUGINS + CUSTOM_PLUGINS],
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
# TODO(davido): Handle plugins
|
|
||||||
#scan_plugins(),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
classpath_collector(
|
classpath_collector(
|
||||||
|
Loading…
Reference in New Issue
Block a user