Merge branch 'stable-2.13'

* stable-2.13:
  Don't show 'LFS Options' header when LFS is not configured
  Update LFS documentation
  Add LFS Project settings to General project's page

Change-Id: I1b833797844ed91f168a4b49d157f12950453aa5
diff --git a/.buckconfig b/.buckconfig
index e78b5d4..b11b5ee 100644
--- a/.buckconfig
+++ b/.buckconfig
@@ -4,6 +4,8 @@
 
 [java]
   src_roots = java, resources
+  source_level = 8
+  target_level = 8
 
 [project]
   ignore = .git
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
index f0e73e7..62a2d27 100644
--- a/lib/gerrit/BUCK
+++ b/lib/gerrit/BUCK
@@ -1,12 +1,11 @@
 include_defs('//bucklets/maven_jar.bucklet')
 
-VER = '2.13.1'
-REPO = MAVEN_CENTRAL
+VER = '2.14-SNAPSHOT'
+REPO = MAVEN_LOCAL
 
 maven_jar(
   name = 'plugin-api',
   id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
-  sha1 = '8e12346dbb677d70987afdbec5352ff6e889a181',
   attach_source = False,
   repository = REPO,
   license = 'Apache2.0',
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java
index 10605bc..c8e3d69 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java
@@ -14,7 +14,6 @@
 
 package com.googlesource.gerrit.plugins.lfs;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Maps;
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.RestApiException;
@@ -32,14 +31,6 @@
 
 @Singleton
 class GetLfsGlobalConfig implements RestReadView<ProjectResource> {
-  private static final Function<LfsBackend, LfsBackendType> TO_BACKEND_CFG =
-      new Function<LfsBackend, LfsBackendType>() {
-        @Override
-        public LfsBackendType apply(LfsBackend input) {
-          return input.type;
-        }
-      };
-
   private final LfsConfigurationFactory lfsConfigFactory;
   private final AllProjectsName allProjectsName;
   private final Provider<CurrentUser> self;
@@ -65,7 +56,7 @@
     LfsGlobalConfig globalConfig = lfsConfigFactory.getGlobalConfig();
     info.defaultBackendType = globalConfig.getDefaultBackend().type;
     info.backends = Maps.transformValues(globalConfig.getBackends(),
-        TO_BACKEND_CFG);
+        b -> b.type);
 
     List<LfsProjectConfigSection> configSections =
         lfsConfigFactory.getProjectsConfig().getConfigSections();
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsGlobalConfig.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsGlobalConfig.java
index 2eab3d6..994da0d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsGlobalConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/LfsGlobalConfig.java
@@ -14,7 +14,6 @@
 
 package com.googlesource.gerrit.plugins.lfs;
 
-import com.google.common.base.Function;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
@@ -42,15 +41,10 @@
 
   public Map<String, LfsBackend> getBackends() {
     Builder<String, LfsBackend> builder = ImmutableMap.builder();
-    for (final LfsBackendType type : LfsBackendType.values()) {
+    for (LfsBackendType type : LfsBackendType.values()) {
       Map<String, LfsBackend> backendsOfType =
           FluentIterable.from(cfg.getSubsections(type.name()))
-              .toMap(new Function<String, LfsBackend>() {
-                @Override
-                public LfsBackend apply(String input) {
-                  return new LfsBackend(input, type);
-                }
-              });
+              .toMap(s -> new LfsBackend(s, type));
       builder.putAll(backendsOfType);
     }