For example, ‘JavaBasePlugin’ has the following code
project.getTasks().withType(AbstractCompile.class, new Action<AbstractCompile>() {
public void execute(final AbstractCompile compile) {
ConventionMapping conventionMapping = compile.getConventionMapping();
conventionMapping.map("sourceCompatibility", new Callable<Object>() {
public Object call() throws Exception {
return javaConvention.getSourceCompatibility().toString();
}
});
conventionMapping.map("targetCompatibility", new Callable<Object>() {
public Object call() throws Exception {
return javaConvention.getTargetCompatibility().toString();
}
});
}
});
Which value wins if a build explicitly sets the value? e.g. if one were to do the following.
project.tasks.withType(AbstractCompile, { it.sourceCompatibility = someValue } )
Use case is that I have someone who wants to compile 1 sourceset with java7 and another with java6.