9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-21 15:59:33 +00:00
Files
LeavesMC/patches/api/0005-Hide-irrelevant-compilation-warnings.patch
violetc f40d340092 1.20.6 (#216)
---------

Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com>
Co-authored-by: Bluemangoo <chenfy2006@qq.com>
2024-05-20 23:03:56 +08:00

36 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Wed, 19 Jul 2023 20:08:16 +0800
Subject: [PATCH] Hide irrelevant compilation warnings
diff --git a/build.gradle.kts b/build.gradle.kts
index fd39ed209b20c927054b8482c400beeeeab460a3..d83f2d45849411afd91e27721f73189ed2a8bca5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -130,6 +130,15 @@ val generateApiVersioningFile by tasks.registering {
}
}
+// Leaves 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")
+}
+// Leaves end - hide irrelevant compilation warnings
+
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -187,6 +196,8 @@ tasks.withType<Javadoc> {
into("build/docs/javadoc")
}
}
+
+ options.addStringOption("Xdoclint:none", "-quiet") // Leaves - hide irrelevant compilation warnings
}
tasks.test {