From 982654e1d13249830c515243ca061bf42e308734 Mon Sep 17 00:00:00 2001 From: Adam Thomas Date: Wed, 8 Dec 2021 11:31:08 -0800 Subject: [PATCH] Fix javadoc search links Our javadocs are broken due to JDK bug https://bugs.openjdk.java.net/browse/JDK-8215291 which is fixed in JDK 12. We can work around it by specifying --no-module-directories when generating javadocs. fixes https://github.com/awslabs/smithy/issues/1006 --- build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.gradle b/build.gradle index ca0cd7233f6..f07952b2513 100644 --- a/build.gradle +++ b/build.gradle @@ -234,6 +234,13 @@ project.afterEvaluate { allprojects { tasks.withType(Javadoc) { options.addStringOption('Xdoclint:-html', '-quiet') + // Fixed in JDK 12: https://bugs.openjdk.java.net/browse/JDK-8215291 + // --no-module-directories does not exist in JDK 8 and is removed in 13 + if (JavaVersion.current().isJava9() + || JavaVersion.current().isJava10() + || JavaVersion.current().isJava11()) { + options.addBooleanOption('-no-module-directories', true) + } } }