9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-23 08:49:28 +00:00
Files
Gale/patches/api/0001-Hide-irrelevant-compilation-warnings.patch
2024-07-03 12:36:26 +08:00

38 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Tue, 29 Nov 2022 01:15:55 +0100
Subject: [PATCH] Hide irrelevant compilation warnings
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
diff --git a/build.gradle.kts b/build.gradle.kts
index 540fe7e2c110e79c3742f229b3ed8c54b101d260..aabcd87ed238fe6b2215aeaa49bdb3d429ba92e9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -130,6 +130,15 @@ val generateApiVersioningFile by tasks.registering {
}
}
+// Gale start - hide irrelevant compilation warnings
+tasks.withType<JavaCompile> {
+ val compilerArgs = options.compilerArgs
+ compilerArgs.add("-Xlint:-module")
+ compilerArgs.add("-Xlint:-removal")
+ compilerArgs.add("-Xlint:-dep-ann")
+}
+// Gale end - hide irrelevant compilation warnings
+
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -188,6 +197,8 @@ tasks.withType<Javadoc> {
into("build/docs/javadoc")
}
}
+
+ options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings
}
tasks.test {