Apache Lucene open-source search software
LUCENE-9201: remove javadoc task remnants. Make javadoc depend on renderJavadoc and skip the default gradle's implementation.
Dawid Weiss9244558752e2
diff --git a/build.gradle b/build.gradleindex 01d4a7dbedf..b77e8209371 100644--- a/build.gradle+++ b/build.gradle@@ -77,7 +77,6 @@ apply from: file('gradle/ant-compat/folder-layout.gradle')// (java, tests)apply from: file('gradle/defaults.gradle')apply from: file('gradle/defaults-java.gradle')-apply from: file('gradle/defaults-javadoc.gradle')apply from: file('gradle/render-javadoc.gradle')apply from: file('gradle/testing/defaults-tests.gradle')apply from: file('gradle/testing/randomization.gradle')diff --git a/gradle/defaults-javadoc.gradle b/gradle/defaults-javadoc.gradledeleted file mode 100644index 9dc3ecf0348..00000000000--- a/gradle/defaults-javadoc.gradle+++ /dev/null@@ -1,77 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--// Configure javadoc defaults.--allprojects {- plugins.withType(JavaPlugin) {- tasks.matching { it.name == "javadoc" }.all {- StandardJavadocDocletOptions opts = (options as StandardJavadocDocletOptions)- opts.locale("en_US")- opts.setJFlags(["-Duser.language=en", "-Duser.country=US"])- opts.charSet = "UTF-8"- opts.encoding = "UTF-8"- opts.docEncoding = "UTF-8"-- opts.noIndex()- opts.memberLevel = JavadocMemberLevel.PROTECTED- opts.version = true- opts.author = true- opts.use = true-- opts.linksOffline(- "https://docs.oracle.com/en/java/javase/11/docs/api/",- project(":lucene").file("tools/javadoc/java11/").toString())-- opts.tags(- "lucene.experimental:a:WARNING: This API is experimental and might change in incompatible ways in the next release.",- "lucene.internal:a:NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.",- "lucene.spi:t:SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).",- )-- opts.addStringOption("-release", "11")- opts.addBooleanOption('Xdoclint:all,-missing', true)-- def libName = project.path.startsWith(":lucene") ? "Lucene" : "Solr"- opts.overview = file("src/java/overview.html").toString()- opts.docTitle = "${libName} ${project.version} ${project.name} API"- opts.windowTitle = "${libName} ${project.version} ${project.name} API"- opts.bottom = "<i>Copyright © 2000-${buildYear} Apache Software Foundation. All Rights Reserved.</i>"- }- }-}--// https://issues.apache.org/jira/browse/LUCENE-9132: Add apache yetus so that javadoc doesn't fail-configure([- project(":solr:solrj"),- project(":solr:core"),- project(":solr:test-framework"),-]) {- configurations {- javadocFix- }-- dependencies {- javadocFix("org.apache.yetus:audience-annotations:0.11.1")- }-- plugins.withType(JavaPlugin) {- javadoc {- classpath += configurations.javadocFix.asFileTree- }- }-}diff --git a/gradle/render-javadoc.gradle b/gradle/render-javadoc.gradleindex c4264240f2a..1dce99ed154 100644--- a/gradle/render-javadoc.gradle+++ b/gradle/render-javadoc.gradle@@ -24,6 +24,16 @@ def pathToDocdir = { path -> path.split(':').drop(2).join('/') }allprojects {plugins.withType(JavaPlugin) {++ // We disable the default javadoc task and have our own+ // javadoc rendering task below. The default javadoc task+ // will just invoke 'renderJavadoc' (to allow people to call+ // conventional task name).+ tasks.matching { it.name == "javadoc" }.all {+ enabled = false+ dependsOn "renderJavadoc"+ }+task renderJavadoc {description "Generates Javadoc API documentation for the main source code. This directly invokes javadoc tool."group "documentation"