Skip to content

Commit 5762bc9

Browse files
committed
Use JDK 8 for compiling Java 5
Hopefully JDK 8 will actually be downloadable.
1 parent d129032 commit 5762bc9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,16 @@ tasks.withType<KotlinCompile>().configureEach {
176176
}
177177

178178
// Compile classes to be loaded into the Gradle VM to Java 5 to match Groovy
179-
// This is for maximum compatibility, these classes will be loaded into every Gradle
180-
// import on all projects, so we don't want to break that with an incompatible class version.
179+
// This is for maximum compatibility, these classes will be loaded into every Gradle import on all
180+
// projects (not just Minecraft), so we don't want to break that with an incompatible class version.
181181
tasks.named(gradleToolingExtensionSourceSet.compileJavaTaskName, JavaCompile::class) {
182-
val java7Compiler = javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(7)) }
182+
val java7Compiler = javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(8)) }
183183
javaCompiler.set(java7Compiler)
184184
options.release.set(null as Int?)
185185
sourceCompatibility = "1.5"
186186
targetCompatibility = "1.5"
187187
options.bootstrapClasspath = files(java7Compiler.map { it.metadata.installationPath.file("jre/lib/rt.jar") })
188+
options.compilerArgs = listOf("-Xlint:-options")
188189
}
189190
tasks.withType<GroovyCompile>().configureEach {
190191
options.compilerArgs = listOf("-proc:none")

0 commit comments

Comments
 (0)