1 import org.gradle.api.JavaVersion
2 
3 if (!JavaVersion.current().isJava11Compatible) {
4     val message = "Project required JDK 11+, but found ${JavaVersion.current()}"
5     if (Idea.active) {
6         logger.error(message)
7     } else {
8         throw GradleException(message)
9     }
10 }
11