Support for 1.20.5/6 (#2721)

* 1.20.6

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* work

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* More work

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* chore: address more removed fields and methods, make it run

* chore: don't allocate unnecessary arrays (by maps)

* chore: the comment might still be noteworthy

* chore: no need to synchronize twice

* fix obfuscation changes

* remove unneeded deprecation

* make regen work without throwing exceptions - but slow

* fix: error when adapting BaseItemStacks without nbt

* fix annoying paper api breakage

---------

Signed-off-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Pierre Maurice Schwang <mail@pschwang.eu>
This commit is contained in:
Hannes Greule
2024-05-19 13:32:18 +02:00
committed by GitHub
parent c9b2f441c1
commit a353c12df0
52 changed files with 1527 additions and 1359 deletions

View File

@ -33,7 +33,7 @@ fun Project.applyCommonConfiguration() {
plugins.withId("java") {
the<JavaPluginExtension>().toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}

View File

@ -21,7 +21,7 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
.configureEach {
val disabledLint = listOf(
"processing", "path", "fallthrough", "serial"
"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
)
options.release.set(17)
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
@ -31,7 +31,7 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
}
configurations.all {
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
}
tasks.withType<Test>().configureEach {

View File

@ -122,7 +122,7 @@ fun Project.applyLibrariesConfiguration() {
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY))
attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED))
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR))
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
}
outgoing.artifact(tasks.named("jar"))
}
@ -137,7 +137,7 @@ fun Project.applyLibrariesConfiguration() {
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY))
attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED))
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR))
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
}
outgoing.artifact(tasks.named("jar"))
}