What is the relationship/difference between sourceCompatibility and targetCompatibility? What happens when they are set to different values?
According to the Toolchain and compatibility section of the Java plugin Gradle documentation:
sourceCompatibilityis "Java version compatibility to use when compiling Java source."targetCompatibilityis "Java version to generate classes for."
My understanding is that targetCompatibility will generate Java bytecode that is compatible with a specific version of Java. Is this a subset of the functionality of sourceCompatibility?