From 23049391be0c02523d590b0ac9197247a78c539a Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sat, 18 Apr 2020 10:49:57 -0400 Subject: [PATCH] Upgrade feature aware check usage of ASM to 7.3.1 (#54577) This commit upgrades the ASM dependency used in the feature aware check to 7.3.1. This gives support for JDK 14. Additionally, now that Gradle understands JDK 13, it means we can remove a restriction on running the feature aware check to JDK 12 and lower. --- x-pack/plugin/build.gradle | 10 +--------- x-pack/plugin/security/build.gradle | 2 +- x-pack/plugin/security/licenses/asm-7.1.jar.sha1 | 1 - x-pack/plugin/security/licenses/asm-7.3.1.jar.sha1 | 1 + x-pack/test/feature-aware/build.gradle | 2 +- 5 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 x-pack/plugin/security/licenses/asm-7.1.jar.sha1 create mode 100644 x-pack/plugin/security/licenses/asm-7.3.1.jar.sha1 diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index 289e6e6db9c..00cd01c0c3c 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -30,7 +30,7 @@ subprojects { dependsOn project.configurations.featureAwarePlugin outputs.file(successMarker) - executable = "${BuildParams.runtimeJavaHome}/bin/java" + executable = "${BuildParams.compilerJavaHome}/bin/java" // default to main class files if such a source set exists final List files = [] @@ -41,14 +41,6 @@ subprojects { // filter out non-existent classes directories from empty source sets final FileCollection classDirectories = project.files(files).filter { it.exists() } - onlyIf { - /* - * The latest version of ASM does not understand JDK 14. However, Gradle can not distinguish between JDK 13 and JDK 14 (treating - * anything above JDK 12 as JDK 13). So, to exclude JDK 14 until a newer version of ASM is available, we also have to exclude JDK - * 13. See https://github.com/elastic/elasticsearch/issues/45927. - */ - Integer.parseInt(BuildParams.runtimeJavaVersion.majorVersion) < 13 - } doFirst { args('-cp', project.configurations.featureAwarePlugin.asPath, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck') classDirectories.each { args it.getAbsolutePath() } diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 72d100342ec..d7c91940465 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -65,7 +65,7 @@ dependencies { compile "net.jcip:jcip-annotations:1.0" compile "net.minidev:json-smart:2.3" compile "net.minidev:accessors-smart:1.2" - compile "org.ow2.asm:asm:7.1" + compile "org.ow2.asm:asm:7.3.1" testCompile 'org.elasticsearch:securemock:1.2' testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}" diff --git a/x-pack/plugin/security/licenses/asm-7.1.jar.sha1 b/x-pack/plugin/security/licenses/asm-7.1.jar.sha1 deleted file mode 100644 index 3a53b2ef7f9..00000000000 --- a/x-pack/plugin/security/licenses/asm-7.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fa29aa438674ff19d5e1386d2c3527a0267f291e \ No newline at end of file diff --git a/x-pack/plugin/security/licenses/asm-7.3.1.jar.sha1 b/x-pack/plugin/security/licenses/asm-7.3.1.jar.sha1 new file mode 100644 index 00000000000..cca8fb27ec6 --- /dev/null +++ b/x-pack/plugin/security/licenses/asm-7.3.1.jar.sha1 @@ -0,0 +1 @@ +7ec32f922315924e82bf58b36ee1b673b2a9b820 \ No newline at end of file diff --git a/x-pack/test/feature-aware/build.gradle b/x-pack/test/feature-aware/build.gradle index 9d7f1504418..71b0dcc1282 100644 --- a/x-pack/test/feature-aware/build.gradle +++ b/x-pack/test/feature-aware/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'elasticsearch.build' dependencies { - compile 'org.ow2.asm:asm:7.1' + compile 'org.ow2.asm:asm:7.3.1' compile project(':server') compile project(':x-pack:plugin:core') testCompile project(':test:framework')