Skip to content

Commit

Permalink
enforce java version (#5804)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin authored Apr 12, 2024
1 parent 8d206b9 commit dcc4b5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

val javaVersion: String = System.getProperty("java.version")
if (javaVersion.substringBefore(".").toInt() < 17) {
throw GradleException("Java 17 or higher is required to build this project. You are using Java $javaVersion.")
}

rootProject.name = "apollo-kotlin"

rootProject.projectDir
Expand All @@ -33,3 +38,4 @@ dependencyResolutionManagement {

apply(from = "./gradle/repositories.gradle.kts")
apply(from = "./gradle/ge.gradle")

0 comments on commit dcc4b5c

Please sign in to comment.