Java 21
Invalid source release when using Intellij
When using intellij after upgrading project JDK and settings, you may still
see Cause: error: invalid source release: 21
. You need to update the JVM used by gradle as well
under Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JVM
.
Source: https://stackoverflow.com/questions/69696321/intellij-invalid-source-release-17