Gradle sourceCompatibility has no effect to subprojects
I have Java 6 and 7 installed on my machine. Gradle uses 1.7 (checked using gradle -v ). But I need to compile my code to be compatible with Java 1.6. As far as I understand the documentation I can use the sourceCompatibility property to do so (and indirectly the targetCompatibility which defaults to the sourceCompatibility ). So I added the following line to my build file (on the root level, not in any closure): sourceCompatibility = 1.6 (to be sure I also added the targetCompatibility = 1.6 in some trials, but that should not make a difference) To check whether the result was actually