LUCENE-9490: Disable both tasks in :lucene:core on Java 15+

This commit is contained in:
Uwe Schindler 2020-08-31 02:09:13 +02:00
parent 06903a40ee
commit 14df77295d
1 changed files with 14 additions and 11 deletions

View File

@ -15,6 +15,18 @@
* 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) {
// Too many classes to fix overall to just enable the above to be level="method" right now,
@ -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'
}