From 38c6071f7095a7097ff8caf7b1a4662b37a3125d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Ku=C4=8Dera?= Date: Thu, 8 Aug 2024 23:40:53 +0200 Subject: [PATCH] feat: 1.21.1 (#5) * deps: bump takenaka * feat: 1.21.1 --- build.gradle.kts | 26 +++++++++++--------------- gradle/libs.versions.toml | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1261f952199b..05a471c72ad0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,3 @@ -import com.fasterxml.jackson.dataformat.xml.XmlMapper import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -13,8 +12,8 @@ import me.kcra.takenaka.core.mapping.ancestry.ConstructorComputationMode import me.kcra.takenaka.core.mapping.ancestry.impl.collectNamespaceIds import me.kcra.takenaka.core.mapping.ancestry.impl.computeIndices import me.kcra.takenaka.core.mapping.resolve.impl.* -import me.kcra.takenaka.core.util.objectMapper import me.kcra.takenaka.generator.common.provider.impl.* +import me.kcra.takenaka.generator.web.JDK_21_BASE_URL import me.kcra.takenaka.generator.web.WebGenerator import me.kcra.takenaka.generator.web.buildWebConfig import me.kcra.takenaka.generator.web.modularClassSearchIndexOf @@ -44,7 +43,7 @@ group = "me.kcra.takenaka" // change me // format: +[-SNAPSHOT] // this is included in META-INF/MANIFEST.MF under Implementation-Version // be nice to people who use the bundles and don't change the format -version = "1.8.8+1.21" // change me +version = "1.8.8+1.21.1" // change me /** * A three-way choice of mappings. @@ -102,15 +101,12 @@ val bundleWorkspace by lazy { } } -val objectMapper = objectMapper() -val xmlMapper = XmlMapper() - -val manifest = objectMapper.versionManifest() -val yarnProvider = YarnMetadataProvider(sharedCacheWorkspace, xmlMapper) +val manifest = versionManifestOf() +val yarnProvider = YarnMetadataProvider(sharedCacheWorkspace) val mappingConfig = buildMappingConfig { version( manifest - .range("1.8.8", "1.21") { // change me + .range("1.8.8", "1.21.1") { // change me // exclude 1.20 and 1.20.5 - hotfixed versions // exclude 1.16 and 1.10.1, they don't have most mappings and are basically not used at all // exclude 1.8.9, client-only update - no Spigot mappings, no thank you @@ -136,8 +132,8 @@ val mappingConfig = buildMappingConfig { intercept(::MethodArgSourceFilter) contributors { versionWorkspace -> - val mojangProvider = MojangManifestAttributeProvider(versionWorkspace, objectMapper) - val spigotProvider = SpigotManifestProvider(versionWorkspace, objectMapper) + val mojangProvider = MojangManifestAttributeProvider(versionWorkspace) + val spigotProvider = SpigotManifestProvider(versionWorkspace) buildList { if (platform.wantsServer) { @@ -161,11 +157,11 @@ val mappingConfig = buildMappingConfig { // 1.16.5 mappings have been republished with proper packages, even though the reobfuscated JAR does not have those // See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/commits/80d35549ec67b87a0cdf0d897abbe826ba34ac27 link.createPrependingContributor( - SpigotClassMappingResolver(versionWorkspace, xmlMapper, spigotProvider), + SpigotClassMappingResolver(versionWorkspace, spigotProvider), prependEverything = versionWorkspace.version.id == "1.16.5" ) ) - add(link.createPrependingContributor(SpigotMemberMappingResolver(versionWorkspace, xmlMapper, spigotProvider))) + add(link.createPrependingContributor(SpigotMemberMappingResolver(versionWorkspace, spigotProvider))) } } } @@ -181,7 +177,7 @@ val mappingConfig = buildMappingConfig { } } -val mappingProvider = ResolvingMappingProvider(mappingConfig, manifest, xmlMapper) +val mappingProvider = ResolvingMappingProvider(mappingConfig, manifest) val analyzer = MappingAnalyzerImpl( AnalysisOptions( innerClassNameCompletionCandidates = setOf("spigot"), @@ -291,7 +287,7 @@ val webConfig = buildWebConfig { transformer(CSSInliningTransformer("cdn.jsdelivr.net")) transformer(MinifyingTransformer()) - index(objectMapper.modularClassSearchIndexOf("https://docs.oracle.com/en/java/javase/21/docs/api")) + index(modularClassSearchIndexOf(JDK_21_BASE_URL)) replaceCraftBukkitVersions("spigot") friendlyNamespaces("mojang", "spigot", "yarn", "searge", "intermediary", "source") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b6cfd69f2c23..280c467b5a51 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -takenaka = "1.1.4" +takenaka = "1.2.0" [libraries] generator-web = { group = "me.kcra.takenaka", name = "generator-web", version.ref = "takenaka" }