mirror of https://github.com/apache/lucene.git
LUCENE-9490: skip checkMissingDocsDefault on runtime Java > 14.
This commit is contained in:
parent
a57ba25400
commit
346dde3395
|
@ -32,6 +32,9 @@ JavaInstallation altJvm = {
|
|||
}
|
||||
}()
|
||||
|
||||
// Set up root project's property.
|
||||
rootProject.ext.runtimeJava = altJvm
|
||||
|
||||
if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
|
||||
// Set up java toolchain tasks to use the alternative Java.
|
||||
// This is a related Gradle issue for the future:
|
||||
|
@ -63,6 +66,7 @@ if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
|
|||
options.forkOptions.javaHome = altJvm.installationDirectory.asFile
|
||||
}
|
||||
|
||||
// Javadoc compilation.
|
||||
def javadocExecutable = altJvm.jdk.get().javadocExecutable.asFile
|
||||
tasks.matching { it.name == "renderJavadoc" || it.name == "renderSiteJavadoc" }.all {
|
||||
dependsOn ":altJvmWarning"
|
||||
|
|
|
@ -37,6 +37,18 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add missing docs for all classes and bump this to level=class
|
||||
if (project.path.startsWith(":solr")) {
|
||||
level = 'package'
|
||||
|
@ -72,7 +84,6 @@ configure(project(':lucene:core')) {
|
|||
"org/apache/lucene/index",
|
||||
"org/apache/lucene/codecs"
|
||||
].collect { path -> file("${project.javadoc.destinationDir}/${path}") }
|
||||
|
||||
checkMissingDocs {
|
||||
dependsOn checkMissingDocsMethod
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue