diff options
-rw-r--r-- | build.gradle | 6 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 2 | ||||
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/modules/GcMonitoringModule.java | 2 | ||||
-rw-r--r-- | spark-fabric/build.gradle | 9 | ||||
-rw-r--r-- | spark-forge/build.gradle | 9 | ||||
-rw-r--r-- | spark-velocity4/build.gradle | 9 | ||||
-rw-r--r-- | spark-waterdog/build.gradle | 7 |
7 files changed, 28 insertions, 16 deletions
diff --git a/build.gradle b/build.gradle index 91ae2c7..9360266 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,10 @@ subprojects { pluginDescription = 'spark is a performance profiling plugin/mod for Minecraft clients, servers and proxies.' } - compileJava { - options.compilerArgs.addAll(['--release', '8']) + java { + toolchain { + languageVersion = JavaLanguageVersion.of(8) + } } tasks.withType(JavaCompile) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..e750102 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/GcMonitoringModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/GcMonitoringModule.java index 8e2d199..88d4169 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/GcMonitoringModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/GcMonitoringModule.java @@ -129,7 +129,7 @@ public class GcMonitoringModule implements CommandModule { ); } - if (report.size() == 1) { + if (collectorStats.isEmpty()) { resp.replyPrefixed(text("No garbage collectors are reporting data.")); } else { report.forEach(resp::reply); diff --git a/spark-fabric/build.gradle b/spark-fabric/build.gradle index 0c16fcb..8dcd3fe 100644 --- a/spark-fabric/build.gradle +++ b/spark-fabric/build.gradle @@ -5,10 +5,11 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' } -compileJava { - // override, compile targeting J16 - options.compilerArgs.clear() - options.compilerArgs.addAll(['--release', '16']) +java { + toolchain { + // override, compile targeting J16 + languageVersion = JavaLanguageVersion.of(16) + } } repositories { diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index 98b70d4..674e031 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -14,10 +14,11 @@ plugins { apply plugin: 'net.minecraftforge.gradle' -compileJava { - // override, compile targeting J16 - options.compilerArgs.removeAll(['--release', '8']) - options.compilerArgs.addAll(['--release', '16']) +java { + toolchain { + // override, compile targeting J16 + languageVersion = JavaLanguageVersion.of(16) + } } minecraft { diff --git a/spark-velocity4/build.gradle b/spark-velocity4/build.gradle index 8c70779..00c837d 100644 --- a/spark-velocity4/build.gradle +++ b/spark-velocity4/build.gradle @@ -3,10 +3,11 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' } -compileJava { - // override, compile targeting J11 - options.compilerArgs.clear() - options.compilerArgs.addAll(['--release', '11']) +java { + toolchain { + // override, compile targeting J11 + languageVersion = JavaLanguageVersion.of(11) + } } dependencies { diff --git a/spark-waterdog/build.gradle b/spark-waterdog/build.gradle index 8977056..c865ab8 100644 --- a/spark-waterdog/build.gradle +++ b/spark-waterdog/build.gradle @@ -2,6 +2,13 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' } +java { + toolchain { + // override, compile targeting J11 + languageVersion = JavaLanguageVersion.of(11) + } +} + dependencies { implementation project(':spark-common') implementation 'net.kyori:adventure-text-serializer-legacy:4.4.0' |