diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy index fc18e4e7af..ef864b03c8 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocApiPlugin.groovy @@ -23,6 +23,7 @@ import java.util.Set; import java.util.regex.Pattern; import org.gradle.api.Action; +import org.gradle.api.JavaVersion import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.plugins.JavaPluginConvention; @@ -49,6 +50,16 @@ public class JavadocApiPlugin implements Plugin { api.setGroup("Documentation"); api.setDescription("Generates aggregated Javadoc API documentation."); + api.doLast { + if (JavaVersion.current().isJava11Compatible()) { + project.copy({ copy -> copy + .from(api.destinationDir) + .into(api.destinationDir) + .include("element-list") + .rename("element-list", "package-list") + }); + } + } Set subprojects = rootProject.getSubprojects(); for (Project subproject : subprojects) {