Neil Chaudhuri wrote:
> 
> It wasn't until I added sourceCompatibility to the individual scripts
> themselves that the project is compiled with 1.6. It isn't the worst thing
> in the world, but is there a way for the setting to be applied to all
> modules but from a single location.
> 

sourceCompatibility is a convention property brought in by the Java (base)
plugin. Convention properties currently have to be set after the
corresponding plugin has been applied, which is why setting it in
gradle.properties doesn't work.

To set sourceCompatibility for all projects, add this to the root project's
build script:

allprojects { // or: subprojects {
  apply plugin: "java"
  sourceCompatibility = 1.6
}

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Creator, Spock Framework
http://spockframework.org




-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Inheriting-sourceCompatibility-in-a-Multi-Module-Project-tp3405474p3405519.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to