Add buck rule and alias to generate source jar Change-Id: Id588ded39de5fb3defbc792a8bfbd39532464e2f
diff --git a/.buckconfig b/.buckconfig index 6e6bd4a..1e14e05 100644 --- a/.buckconfig +++ b/.buckconfig
@@ -1,6 +1,7 @@ [alias] events-log = //:events-log plugin = //:events-log + src = //:events-log-sources [java] src_roots = java, resources
diff --git a/BUCK b/BUCK index 2108569..81ae99b 100644 --- a/BUCK +++ b/BUCK
@@ -1,10 +1,12 @@ include_defs('//bucklets/gerrit_plugin.bucklet') +include_defs('//bucklets/java_sources.bucklet') +SOURCES = glob(['src/main/java/**/*.java']) +RESOURCES = glob(['src/main/resources/**/*']) DEPS = [ '//lib:gson', '//lib/commons:dbcp', ] - TEST_DEPS = GERRIT_PLUGIN_API + [ ':events-log__plugin', '//lib/easymock:easymock', @@ -15,8 +17,8 @@ gerrit_plugin( name = 'events-log', - srcs = glob(['src/main/java/**/*.java']), - resources = glob(['src/main/resources/**/*']), + srcs = SOURCES, + resources = RESOURCES, manifest_entries = [ 'Gerrit-PluginName: events-log', 'Implementation-Vendor: Ericsson', @@ -39,3 +41,8 @@ source_under_test = [':events-log__plugin'], deps = TEST_DEPS, ) + +java_sources( + name = 'events-log-sources', + srcs = SOURCES + RESOURCES, +)