Browse Source

Bump minimum compile jdk version to 15 (#67126)

(cherry picked from commit c7623e63c880820cf1804e5cc1c5070d623faa5c)
Mark Vieira 4 years ago
parent
commit
3798d7ef46

+ 1 - 1
.ci/java-versions.properties

@@ -4,6 +4,6 @@
 # build and test Elasticsearch for this branch. Valid Java versions
 # are 'java' or 'openjdk' followed by the major release number.
 
-ES_BUILD_JAVA=openjdk14
+ES_BUILD_JAVA=openjdk15
 ES_RUNTIME_JAVA=openjdk11
 GRADLE_TASK=build

+ 1 - 0
buildSrc/build.gradle

@@ -99,6 +99,7 @@ dependencies {
   api 'org.apache.rat:apache-rat:0.11'
   api "org.elasticsearch:jna:5.5.0"
   api 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
+  // When upgrading forbidden apis, ensure dependency version is bumped in ThirdPartyPrecommitPlugin as well
   api 'de.thetaphi:forbiddenapis:3.1'
   api 'com.avast.gradle:gradle-docker-compose-plugin:0.13.4'
   api 'org.apache.maven:maven-model:3.6.2'

+ 0 - 12
buildSrc/src/integTest/java/org/elasticsearch/gradle/precommit/ThirdPartyAuditTaskIT.java

@@ -49,18 +49,6 @@ public class ThirdPartyAuditTaskIT extends GradleIntegrationTestCase {
         assertNoDeprecationWarning(result);
     }
 
-    public void testWithEmptyRules() {
-        getGradleRunner("thirdPartyAudit").withArguments(
-            ":clean",
-            ":empty",
-            "-s",
-            "-PcompileOnlyGroup=other.gradle:broken-log4j",
-            "-PcompileOnlyVersion=0.0.1",
-            "-PcompileGroup=other.gradle:dummy-io",
-            "-PcompileVersion=0.0.1"
-        ).buildAndFail();
-    }
-
     public void testViolationFoundAndCompileOnlyIgnored() {
         BuildResult result = getGradleRunner("thirdPartyAudit").withArguments(
             ":clean",

+ 1 - 1
buildSrc/src/main/java/org/elasticsearch/gradle/precommit/ThirdPartyAuditPrecommitPlugin.java

@@ -40,7 +40,7 @@ public class ThirdPartyAuditPrecommitPlugin extends PrecommitPlugin implements I
     public TaskProvider<? extends Task> createTask(Project project) {
         project.getPlugins().apply(CompileOnlyResolvePlugin.class);
         project.getConfigurations().create("forbiddenApisCliJar");
-        project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:2.7");
+        project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.1");
         Configuration jdkJarHellConfig = project.getConfigurations().create(JDK_JAR_HELL_CONFIG_NAME);
         if (BuildParams.isInternal() && project.getPath().equals(LIBS_ELASTICSEARCH_CORE_PROJECT_PATH) == false) {
             // External plugins will depend on this already via transitive dependencies.

+ 1 - 1
buildSrc/src/main/resources/minimumCompilerVersion

@@ -1 +1 @@
-14
+15