The compiler doesn’t allow you to compile new language features back into an older target bytecode.
Usually, your source compatibility will be equal to or lower than the target compatibility (imagine setting the source compatibility to 1.5, but targeting 1.7) because you’ll build multiple jars or share source in some way.
If you’re running Gradle with JDK8, it’ll use the JDK8 compiler.