Merge pull request #18047 from rjernst/javac_target

Build: Explicitly set target and source compatibility for javac
This commit is contained in:
Ryan Ernst 2016-04-28 08:30:43 -07:00
commit be239b86b6

View File

@ -355,6 +355,11 @@ class BuildPlugin implements Plugin<Project> {
}
options.encoding = 'UTF-8'
//options.incremental = true
// gradle ignores target/source compatibility when it is "unnecessary", but since to compile with
// java 9, gradle is running in java 8, it incorrectly thinks it is unnecessary
assert minimumJava == JavaVersion.VERSION_1_8
options.compilerArgs << '-target' << '1.8' << '-source' << '1.8'
}
}
}