Can't build Java 1.8 even with proper Java version in use

Hi, I tried wrapping it in a compileJava block and I still see the same issue…

compileJava {

sourceCompatibility = 1.8 }

~/myproject $ gradle clean build :clean :compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:compileJava’. > invalid source release: 1.8

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.991 secs