From 7ded6b1749af8c4c994bfa23d7a7927918ad06f0 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Fri, 4 Mar 2022 11:57:31 -0500 Subject: [PATCH] Fixing the --html5 flag usage for javadoc Signed-off-by: Andriy Redko --- .../main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java index 67a0d426c10d0..c701c47f9e68c 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java @@ -270,7 +270,9 @@ private static void configureJavadoc(Project project) { * that the default will change to html5 in the future. */ CoreJavadocOptions javadocOptions = (CoreJavadocOptions) javadoc.getOptions(); - javadocOptions.addBooleanOption("html5", true); + if (BuildParams.getRuntimeJavaVersion().compareTo(JavaVersion.VERSION_1_8) > 0) { + javadocOptions.addBooleanOption("html5", true); + } }); TaskProvider javadoc = project.getTasks().withType(Javadoc.class).named("javadoc");