You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2020/09/14 16:38:39 UTC
[lucene-solr] 21/39: LUCENE-9490: Disable both tasks in
:lucene:core on Java 15+
This is an automated email from the ASF dual-hosted git repository.
thelabdude pushed a commit to branch reference_impl_gradle_updates
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 4a78c206569ae56453d18de136f7a50b8d6923d6
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Mon Aug 31 02:09:13 2020 +0200
LUCENE-9490: Disable both tasks in :lucene:core on Java 15+
---
gradle/validation/missing-docs-check.gradle | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/gradle/validation/missing-docs-check.gradle b/gradle/validation/missing-docs-check.gradle
index 57399ec..c0ee56e 100644
--- a/gradle/validation/missing-docs-check.gradle
+++ b/gradle/validation/missing-docs-check.gradle
@@ -14,6 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+def javaVersionCheck = {
+ def maxSupported = JavaVersion.VERSION_14
+ def runtimeVersion = runtimeJava.javaVersion
+ if (runtimeVersion > JavaVersion.VERSION_14) {
+ logger.warn("Skipping task because runtime Java version ${runtimeVersion} is " +
+ "higher than Java ${maxSupported}.")
+ return false
+ } else {
+ return true
+ }
+}
allprojects {
plugins.withType(JavaPlugin) {
@@ -37,17 +49,7 @@ allprojects {
task checkMissingDocsDefault(type: CheckMissingDocsTask, dependsOn: 'renderJavadoc') {
dirs += [ project.javadoc.destinationDir ]
- onlyIf {
- def maxSupported = JavaVersion.VERSION_14
- def runtimeVersion = runtimeJava.javaVersion
- if (runtimeVersion > JavaVersion.VERSION_14) {
- logger.warn("Skipping task because runtime Java version ${runtimeVersion} is " +
- "higher than Java ${maxSupported}.")
- return false
- } else {
- return true
- }
- }
+ onlyIf javaVersionCheck
// TODO: add missing docs for all classes and bump this to level=class
if (project.path.startsWith(":solr")) {
@@ -72,6 +74,7 @@ configure(project(':lucene:core')) {
// Defer until java plugin has been applied, otherwise we can't resolve project.javadoc.
plugins.withType(JavaPlugin) {
task checkMissingDocsMethod(type: CheckMissingDocsTask, dependsOn: 'renderJavadoc') {
+ onlyIf javaVersionCheck
level = 'method'
}