Reputation: 2625
The below is my build.gradle.
When I Bootrun, i get the error Execution failed for task ':compileJava invalid source release: 18
plugins {
id 'org.springframework.boot' version '2.6.9'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.loginapp'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '18'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
Upvotes: 1
Views: 1735
Reputation: 1178
Since you're using IntelliJ, shared the screenshot and told us you alread checked the java version and I already got this error a few times here is my TODO I go through when I get this error:
Project bytecode version
& Per-module bytecode version
-> Check thoseHope this works :)
Upvotes: 1