We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
options.release
1 parent 0979cd2 commit d7c2e10Copy full SHA for d7c2e10
build.gradle.kts
@@ -72,7 +72,13 @@ allprojects {
72
73
tasks {
74
withType<JavaCompile> {
75
- options.release = 8
+ // See: https://docs.gradle.org/current/userguide/building_java_projects.html#sec:compiling_with_release
76
+ if (JavaVersion.current().isJava10Compatible) {
77
+ options.release = 8
78
+ } else {
79
+ sourceCompatibility = JavaVersion.VERSION_1_8.toString()
80
+ targetCompatibility = JavaVersion.VERSION_1_8.toString()
81
+ }
82
options.encoding = "UTF-8"
83
options.compilerArgs.add("-Xlint:all")
84
}
0 commit comments