Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Upgrade JGit to 4.7.6.201810191618-r
Add Eclipse project
Remove redundant entries from .gitignore
Change-Id: I708e12ab1782f0475e4436346958c188d8ae3938
diff --git a/.gitignore b/.gitignore
index 696ab76..72d1580 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,9 @@
-/bucklets
-/.buckversion
/.classpath
/.project
-/.buckd
-/.watchmanconfig
-/buck-out
+/.settings
/bazel-bin
/bazel-genfiles
/bazel-out
/bazel-lfs
/bazel-testlogs
+/eclipse-out
diff --git a/.settings/org.eclipse.core.runtime.prefs b/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..8667cfd
--- /dev/null
+++ b/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Tue Sep 02 16:59:24 PDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/BUILD b/BUILD
index 051435c..aac05ab 100644
--- a/BUILD
+++ b/BUILD
@@ -19,8 +19,8 @@
resources = glob(["src/main/resources/**/*"]),
deps = [
"@jgit-http-apache//jar",
- "@jgit-lfs//jar",
"@jgit-lfs-server//jar",
+ "@jgit-lfs//jar",
],
)
@@ -28,9 +28,8 @@
name = "lfs_tests",
srcs = glob(["src/test/java/**/*.java"]),
tags = ["lfs"],
- deps = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
- ":lfs__plugin",
- "@jgit-lfs//jar",
+ deps = [
+ ":lfs__plugin_test_deps",
],
)
@@ -40,6 +39,6 @@
visibility = ["//visibility:public"],
exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
":lfs__plugin",
- "@joda-time//jar",
+ "@jgit-lfs//jar",
],
)
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 7f44b04..f71464f 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -62,5 +62,13 @@
bazel test plugins/@PLUGIN@:@PLUGIN@_tests
```
+This project can be imported into the Eclipse IDE. Execute:
+
+```
+ ./tools/eclipse/project.sh
+```
+
+to generate the required files and then import the project.
+
How to build the Gerrit Plugin API is described in the [Gerrit
documentation](../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files).
diff --git a/tools/bzl/classpath.bzl b/tools/bzl/classpath.bzl
new file mode 100644
index 0000000..d5764f7
--- /dev/null
+++ b/tools/bzl/classpath.bzl
@@ -0,0 +1,4 @@
+load(
+ "@com_googlesource_gerrit_bazlets//tools:classpath.bzl",
+ "classpath_collector",
+)
diff --git a/tools/eclipse/BUILD b/tools/eclipse/BUILD
new file mode 100644
index 0000000..56fe7de
--- /dev/null
+++ b/tools/eclipse/BUILD
@@ -0,0 +1,9 @@
+load("//tools/bzl:classpath.bzl", "classpath_collector")
+
+classpath_collector(
+ name = "main_classpath_collect",
+ testonly = 1,
+ deps = [
+ "//:lfs__plugin_test_deps",
+ ],
+)
diff --git a/tools/eclipse/project.sh b/tools/eclipse/project.sh
new file mode 100755
index 0000000..2e79913
--- /dev/null
+++ b/tools/eclipse/project.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+`bazel query @com_googlesource_gerrit_bazlets//tools/eclipse:project --output location | sed s/BUILD:.*//`project.py -n lfs -r .