Skip to content

Commit

Permalink
feat: 1.21.1 (#5)
Browse files Browse the repository at this point in the history
* deps: bump takenaka

* feat: 1.21.1
  • Loading branch information
zlataovce authored Aug 8, 2024
1 parent 66730d7 commit 38c6071
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
26 changes: 11 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.fasterxml.jackson.dataformat.xml.XmlMapper
import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand All @@ -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
Expand Down Expand Up @@ -44,7 +43,7 @@ group = "me.kcra.takenaka" // change me
// format: <oldest version>+<newest version>[-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.
Expand Down Expand Up @@ -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
Expand All @@ -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) {
Expand All @@ -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)))
}
}
}
Expand All @@ -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"),
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }

0 comments on commit 38c6071

Please sign in to comment.