In a multi module project your master build.gradle might look like this:
project.sourceCompatibility = 1.6 }
the java subprojects then have a build.gradle like this:
apply plugin: ‘java’
However when you run with a 1.7 jdk the class files will have version 51 and not the expected 50. To make it work you must either move the setting of source compatibility to each of those subprojects, or move the apply plugin: ‘java’ to the master. Is the second option legitimate if some subprojects contain no java?
What is the best way to set java plugin options when not all subprojects are java?
This query on stackoverflow: http://stackoverflow.com/questions/21028438/gradle-sourcecompatibility-1-6-does-not-seem-to-create-1-6-byte-code
I think results from this issue.