| include_defs('//bucklets/gerrit_plugin.bucklet') |
| include_defs('//lib/prolog/prolog.defs') |
| include_defs('//plugins/owners/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), |
| deps = [ |
| '//plugins/owners/gerrit-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', |
| ] + EXTERNAL_DEPS, |
| ) |