What is the relationship/difference between sourceCompatibility
and targetCompatibility
? What happens when they are set to different values?
According to Gradle documentation:
sourceCompatibility
is "Java version compatibility to use when compiling Java source."
targetCompatibility
is "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
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…