Skip to content

Commit

Permalink
Updated: code cleanup and styling; fixes test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoayyed committed Jan 16, 2020
1 parent fee67b8 commit 70097b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gradle/tasks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,10 @@ task getResource(group: "build", description: "Fetch a CAS resource and move it
def isRunningCasServerSnapshot(casServerVersion) {
return "${casServerVersion}".contains("-SNAPSHOT")
}

task verifyRequiredJavaVersion {
logger.info "Checking current Java version ${JavaVersion.current()} for required Java version ${project.targetCompatibility}"
if (!JavaVersion.current().name.equalsIgnoreCase("${project.targetCompatibility}")) {
throw new GradleException("Current Java version ${JavaVersion.current()} does not match required Java version ${project.targetCompatibility}")
}
}

0 comments on commit 70097b8

Please sign in to comment.