You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2020/04/12 11:29:32 UTC

[lucene-solr] branch master updated: LUCENE-9201: remove javadoc task remnants. Make javadoc depend on renderJavadoc and skip the default gradle's implementation.

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 9244558  LUCENE-9201: remove javadoc task remnants. Make javadoc depend on renderJavadoc and skip the default gradle's implementation.
9244558 is described below

commit 9244558752e257d0436daef1f38df5de872192fc
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Sun Apr 12 12:55:56 2020 +0200

    LUCENE-9201: remove javadoc task remnants. Make javadoc depend on renderJavadoc and skip the default gradle's implementation.
---
 build.gradle                   |  1 -
 gradle/defaults-javadoc.gradle | 77 ------------------------------------------
 gradle/render-javadoc.gradle   | 10 ++++++
 3 files changed, 10 insertions(+), 78 deletions(-)

diff --git a/build.gradle b/build.gradle
index 01d4a7d..b77e820 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.gradle
deleted file mode 100644
index 9dc3ecf..0000000
--- 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 &copy; 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.gradle
index c426424..1dce99e 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"