Revert "Remove buck build" Until Bazel standalone build is implemented, Buck build need to stay. This reverts commit 00f4aa18bec46709873745494f7a984cc652b4b2. Change-Id: I8455fa5b96a470703bfc1fdc6f0b617265445233
diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 0000000..0a84b64 --- /dev/null +++ b/.buckconfig
@@ -0,0 +1,15 @@ +[alias] + project-group-structure = //:project-group-structure + plugin = //:project-group-structure + src = //:project-group-structure-sources + +[java] + src_roots = java, resources + +[project] + ignore = .git + +[cache] + mode = dir + dir = buck-out/cache +
diff --git a/BUCK b/BUCK new file mode 100644 index 0000000..dfd8810 --- /dev/null +++ b/BUCK
@@ -0,0 +1,42 @@ +include_defs('//bucklets/gerrit_plugin.bucklet') +include_defs('//bucklets/java_sources.bucklet') + +SOURCES = glob(['src/main/java/**/*.java']) +RESOURCES = glob(['src/main/resources/**/*']) + +TEST_DEPS = GERRIT_TESTS + GERRIT_PLUGIN_API + [ + ':project-group-structure__plugin', +] + +gerrit_plugin( + name = 'project-group-structure', + srcs = SOURCES, + resources = RESOURCES, + manifest_entries = [ + 'Gerrit-PluginName: project-group-structure', + 'Gerrit-ApiType: plugin', + 'Gerrit-Module: com.ericsson.gerrit.plugins.projectgroupstructure.Module', + 'Implementation-Title: project-group-structure plugin', + 'Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/project-group-structure', + 'Implementation-Vendor: Ericsson', + ], +) + +java_test( + name = 'project-group-structure-tests', + srcs = glob(['src/test/java/**/*.java']), + labels = ['project-group-structure'], + deps = TEST_DEPS, +) + +java_sources( + name = 'project-group-structure-sources', + srcs = SOURCES + RESOURCES, +) + +# this is required for bucklets/tools/eclipse/project.py to work +java_library( + name = 'classpath', + deps = TEST_DEPS, +) +
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK new file mode 100644 index 0000000..934d087 --- /dev/null +++ b/lib/gerrit/BUCK
@@ -0,0 +1,19 @@ +include_defs('//bucklets/maven_jar.bucklet') + +VER = '2.14-SNAPSHOT' +REPO = MAVEN_LOCAL + +maven_jar( + name = 'plugin-api', + id = 'com.google.gerrit:gerrit-plugin-api:' + VER, + license = 'Apache2.0', + attach_source = False, + repository = REPO, +) +maven_jar( + name = 'acceptance-framework', + id = 'com.google.gerrit:gerrit-acceptance-framework:' + VER, + license = 'Apache2.0', + attach_source = False, + repository = REPO, +)