Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return of the -Werror #2498

Merged
merged 5 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:5.1.14")
implementation("org.spongepowered:spongegradle-plugin-development:2.2.0")
implementation("org.spongepowered:vanillagradle:0.2.1-20231105.223944-69")
implementation("net.minecraftforge.gradle:ForgeGradle:6.0.20")
implementation("net.minecraftforge.gradle:ForgeGradle:6.0.21")
implementation("net.fabricmc:fabric-loom:$loomVersion")
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.2.0")
Expand Down
7 changes: 5 additions & 2 deletions buildSrc/src/main/kotlin/CommonJavaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, javaRelease: Int =
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
.configureEach {
val disabledLint = listOf(
"processing", "path", "fallthrough", "serial"
"processing", "path", "fallthrough", "serial", "overloads",
)
options.release.set(javaRelease)
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
options.isDeprecation = true
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
options.compilerArgs.add("-Werror")
}

configure<CheckstyleExtension> {
Expand All @@ -53,7 +54,9 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, javaRelease: Int =
tasks.withType<Javadoc>().configureEach {
options.encoding = "UTF-8"
(options as StandardJavadocDocletOptions).apply {
addStringOption("Xdoclint:none", "-quiet")
addBooleanOption("Werror", true)
addBooleanOption("Xdoclint:all", true)
addBooleanOption("Xdoclint:-missing", true)
tags(
"apiNote:a:API Note:",
"implSpec:a:Implementation Requirements:",
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/LibsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ fun Project.applyLibrariesConfiguration() {
exclude(dependency("com.google.guava:guava"))
exclude(dependency("com.google.code.gson:gson"))
exclude(dependency("com.google.errorprone:error_prone_annotations"))
exclude(dependency("com.google.guava:failureaccess"))
exclude(dependency("org.checkerframework:checker-qual"))
exclude(dependency("org.jetbrains:annotations"))
exclude(dependency("org.apache.logging.log4j:log4j-api"))
Expand Down
14 changes: 7 additions & 7 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import org.gradle.api.Project
object Versions {
const val TEXT = "3.0.4"
const val TEXT_EXTRAS = "3.0.6"
const val PISTON = "0.5.8"
const val AUTO_VALUE = "1.9"
const val JUNIT = "5.8.1"
const val MOCKITO = "4.3.1"
const val FAST_UTIL = "8.5.9"
const val GUAVA = "31.1-jre"
const val GSON = "2.10"
const val PISTON = "0.5.10"
const val AUTO_VALUE = "1.10.4"
const val JUNIT = "5.10.2"
const val MOCKITO = "5.11.0"
const val FAST_UTIL = "8.5.12"
const val GUAVA = "32.1.3-jre"
const val GSON = "2.10.1"
const val LOG4J = "2.19.0"
const val LIN_BUS = "0.1.0-SNAPSHOT"
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
3 changes: 2 additions & 1 deletion verification/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ tasks.check {
// Pull the version before our current version.
val baseVersion = "(,${rootProject.version.toString().substringBefore("-SNAPSHOT")}["
for (projectFragment in listOf("bukkit", "cli", "core", "fabric", "forge", "sponge")) {
val capitalizedFragment = projectFragment.capitalize(Locale.ROOT)
val capitalizedFragment =
projectFragment.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString() }
val proj = project(":worldedit-$projectFragment")
evaluationDependsOn(proj.path)

Expand Down
34 changes: 24 additions & 10 deletions verification/src/changes/accepted-bukkit-public-api-changes.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{
"Removal of override method that exists in superclass": [
{
"type": "com.sk89q.worldedit.bukkit.BukkitWorld",
"member": "Method com.sk89q.worldedit.bukkit.BukkitWorld.fullySupports3DBiomes()",
"changes": [
"METHOD_REMOVED"
]
}
]
}
"Incorrect removal detection due to problems with classpath": [
{
"type": "com.sk89q.worldedit.bukkit.BukkitWorld",
"member": "Method com.sk89q.worldedit.bukkit.BukkitWorld.fullySupports3DBiomes()",
"changes": [
"METHOD_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.bukkit.BukkitServerInterface",
"member": "Method com.sk89q.worldedit.bukkit.BukkitServerInterface.getId()",
"changes": [
"METHOD_REMOVED"
]
},
{
"type": "com.sk89q.worldedit.bukkit.BukkitWorld",
"member": "Method com.sk89q.worldedit.bukkit.BukkitWorld.getId()",
"changes": [
"METHOD_REMOVED"
]
}
]
}
11 changes: 10 additions & 1 deletion verification/src/changes/accepted-cli-public-api-changes.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
{
}
"Incorrect removal detection due to problems with classpath": [
{
"type": "com.sk89q.worldedit.cli.schematic.ClipboardWorld",
"member": "Method com.sk89q.worldedit.cli.schematic.ClipboardWorld.getId()",
"changes": [
"METHOD_REMOVED"
]
}
]
}
Loading