Apress / pivotal-certified-pro-spring-dev-exam-02

Source Code for 'Pivotal Certified Professional Core Spring 5 Developer Exam' by Iuliana Cosmina
Other
168 stars 239 forks source link

> No such property: VERSION_13 for class: org.gradle.api.JavaVersion #21

Closed gpimesh closed 3 years ago

gpimesh commented 3 years ago

Hi, I'm getting below error when trying to build the project as below.

D:\Spring Certification\code\pivotal-certified-pro-spring-dev-exam-02-master>gradle build -x test This project is a Criminal Evidence Management System proof of concept application. It is meant to be used together with the "Pivotal Certified Professional Spring Developer Exam, 2nd Edition" published by Apress in order to learn and practice Spring 5.x.

FAILURE: Build failed with an exception.

BUILD FAILED in 1s

D:\Spring Certification\code\pivotal-certified-pro-spring-dev-exam-02-master>java -version java version "13.0.2" 2020-01-14 Java(TM) SE Runtime Environment (build 13.0.2+8) Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

D:\Spring Certification\code\pivotal-certified-pro-spring-dev-exam-02-master>gradle -version

Gradle 5.6.4

Build time: 2019-11-01 20:42:00 UTC Revision: dd870424f9bd8e195d614dc14bb140f43c22da98

Kotlin: 1.3.41 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019 JVM: 13.0.2 (Oracle Corporation 13.0.2+8) OS: Windows 10 10.0 amd64

iuliana commented 3 years ago

Hello @gpimesh,

I am so sorry for seeing this issue so late. I use the same account for work and I think the notification got lost among the work related ones.

In the README of the project it says celarly Gradle 6.x & JDK 11 to 13.

Also, check IntelliJ IDEA setup and make sure it sets the Project SDK and Project language level to 11/12/13. Newer versions of IntelliJ IDEA set those to the most recent JDK version, so that might cause the issue depicted here, since the project does not build with versions > 13 and < 11.

If you manage to build the project with Gradle from the command line, then the editor setup is to blame.

Here you have proof that the buld works in terminak and in IntelliJ IDEA with Gradle 6.9 & Oracle JDK 13.

Cheers!