From 2c3149ef30b52a84adaa8433fdbc5ab2325db3ab Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 28 Aug 2021 17:15:38 -0500 Subject: [PATCH] Fix a potential issue with compiling to the wrong Java version --- build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a5071e9cd..6c181698c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,13 +19,21 @@ apply plugin: 'org.spongepowered.mixin' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'maven-publish' +apply plugin: 'java' // needed for compileJava version = 'a1.3.2' -group = 'com.backsun.lod' +group = 'com.seibel.lod' archivesBaseName = 'lod_1.16.5' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. +compileJava { + // release 8 is needed because otherwise FloatBuffer.flip() will crash + // on some machines + // example thread: https://github.com/eclipse/jetty.project/issues/3244 + options.compilerArgs.addAll(['--release', '8', '-Xlint:unchecked', '-Xlint:deprecation']) +} + println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { // The mappings can be changed at any time, and must be in the following format.