blob: 5640fe11c06a4fea4769828825c2846b99fca9ce [file] [log] [blame]
include_defs('//bucklets/gerrit_plugin.bucklet')
include_defs('//lib/prolog/prolog.defs')
include_defs('//plugins/owners-common/common.defs')
# buck is unhappy to build a gerrit_plugin with no source files.
# On the other side, gerrit-owners-prolog-rules needs to be built after all the java files have been
# compiled. For this reason we have a stub class that has no content and just makes buck happy.
COMPILE_STUB = ['src/main/java/com/vmware/gerrit/owners/CompileStub.java']
java_library(
name = 'gerrit-owners-lib',
srcs = glob([
'src/main/java/**/*.java',
], excludes=COMPILE_STUB),
provided_deps = [
'//plugins/owners-common:common',
] + GERRIT_PLUGIN_API + EXTERNAL_DEPS,
)
prolog_cafe_library(
name = 'gerrit-owners-prolog-rules',
srcs = glob(['src/main/prolog/*.pl']),
deps = [
':gerrit-owners-lib',
'//gerrit-server/src/main/prolog:common',
],
)
gerrit_plugin(
name = 'owners',
srcs = COMPILE_STUB,
manifest_entries = [
'Implementation-Title: Gerrit OWNERS plugin',
'Implementation-URL: https://gerrit.googlesource.com/plugins/owners',
'Gerrit-PluginName: owners',
'Gerrit-Module: com.vmware.gerrit.owners.OwnersModule',
],
deps = [
':gerrit-owners-lib',
':gerrit-owners-prolog-rules',
'//plugins/owners-common:common',
] + EXTERNAL_DEPS,
)