mirror of https://github.com/apache/lucene.git
LUCENE-9490: Disable both tasks in :lucene:core on Java 15+
This commit is contained in:
parent
06903a40ee
commit
14df77295d
|
@ -15,6 +15,18 @@
|
||||||
* limitations under the License.
|
* 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 {
|
allprojects {
|
||||||
plugins.withType(JavaPlugin) {
|
plugins.withType(JavaPlugin) {
|
||||||
// Too many classes to fix overall to just enable the above to be level="method" right now,
|
// 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') {
|
task checkMissingDocsDefault(type: CheckMissingDocsTask, dependsOn: 'renderJavadoc') {
|
||||||
dirs += [ project.javadoc.destinationDir ]
|
dirs += [ project.javadoc.destinationDir ]
|
||||||
|
|
||||||
onlyIf {
|
onlyIf 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: add missing docs for all classes and bump this to level=class
|
// TODO: add missing docs for all classes and bump this to level=class
|
||||||
if (project.path.startsWith(":solr")) {
|
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.
|
// Defer until java plugin has been applied, otherwise we can't resolve project.javadoc.
|
||||||
plugins.withType(JavaPlugin) {
|
plugins.withType(JavaPlugin) {
|
||||||
task checkMissingDocsMethod(type: CheckMissingDocsTask, dependsOn: 'renderJavadoc') {
|
task checkMissingDocsMethod(type: CheckMissingDocsTask, dependsOn: 'renderJavadoc') {
|
||||||
|
onlyIf javaVersionCheck
|
||||||
level = 'method'
|
level = 'method'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue