mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-19 14:59:27 +00:00
* Start implementing Configurate config system * More development * Start migrating to Gson only * Progress * Update usage of WebUtils * Most things now use Gson for JSON * Allow tests to succeed by using new Gson version * Use slightly cleaner version for Version deserializer * Work around older Gson versions without record support * GeyserCustomSkullConfiguration uses Configurate * Fix regression in properties get * New config used in core * The configuration is gone. Long live the config. * More changes and migrations away from Jackson * Improve node ordering when updating configs * typo * Better check for ignoring non-configurate configs for considering comment moving * Ensure metrics UUID is valid * Initial advanced config * Remove Jackson; finish config value placements * Remove duplicate relocate declarations * Let annotations work * Renaming to PluginSpecific * Use global bStats config where possible * Fix test * Re-introduce asterisk behavior in configs * Remove GeyserPluginBootstrap as it's no longer necessary * Remove old config.yml file * Update Xbox achievement comment * Apply suggestions from code review Co-authored-by: chris <github@onechris.mozmail.com> * No need to remove values anymore * Fix: disable bstats relocation on platforms where it is not needed * ensure it builds * Update custom unavailable slot comment Co-authored-by: chris <github@onechris.mozmail.com> * Update cooldown image * Logger message for direct-compression still being enabled * oops * More explicit RuntimeException message Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com> * Constant for 'system' locale * Better config JSON encoding (something is broken with Cloudflare; we'll figure it out * Fix broadcast port default * Add this file too * Update configurate branch * fix build * Fix: Allow using custom config file on Standalone, add relocation comment * Move config loading to GeyserBootstrap interface * Add and rename some config options, add section notes (#5390) * Add and rename some config options, add section notes * adjust message * Update core/src/main/java/org/geysermc/geyser/command/defaults/ConnectionTestCommand.java Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz> * Update core/src/main/java/org/geysermc/geyser/configuration/GeyserConfig.java Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz> * Update ConfigLoader.java * Update AdvancedConfig.java * clarify that we're talking about the HAProxy protocol * rename config option to use-haproxy-protocol * remove ominous warning sign on xbox auth warning * adjust wording --------- Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz> * Back to one config file * Some minor touchups * Configurate: Sectionification (#5904) * Init: config sections * Start on adding tests, move migrations over to ConfigMigrations class * Get rid of auth section again, rename that one config option, fix mtu migration * Move custom skulls config options to the bottom of the gameplay settings * Add more tests * Rename and migrate proxy-protocol-whitelisted-ips to haproxy-protocol-whitelisted-ips * Add automatic downloading of the GeyserOptionalPack * Revert "Add automatic downloading of the GeyserOptionalPack" This reverts commit65b96208fb. * Add more invalid config tests * Warn about emote-offhand-workaround removal * Add automatic loading of the GeyserOptionalPack (feature/configurate) (#5964) * Add automatic downloading of the GeyserOptionalPack * Warn about including the OptionalPack from extensions when Geyser is already including it instead of throwing. * Copy optional pack instead of downloading --------- Co-authored-by: onebeastchris <github@onechris.mozmail.com> * Remove unused variable * Start warning users not running Java 21 * Update tests, temporarily remove NumericRanges test * Remove duplicate advanced section from Geyser dump * Address some "reviews" * yeet md5 hash from geyser dump * Add info about number of resource packs / amount of mappings into Geyser dump * Re-enable invalid config loading test * Fix: allow-custom-skulls migration * Fix test * Add "enable-emotes" configuration option * Rename "emotes-enabled" to "show-emotes" * Only enable integrated pack when optional pack isn't present * Update integrated pack * Exclude jackson annotations, remove leftover debug print * Remove one-time config migration warnings as we don't have access to the logger at that stage * Throw more detailed descriptive error when loading resource packs from the "packs" folder, add another legacy config test * Fix NeoForge's fun module conflict * Re-add warning about moved functionality, fix Geyser-ViaProxy This reverts commitfbadfa574a. * oops * Move GeyserLegacyPingPassthrough to separate thread to avoid Standalone command locking issues --------- Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com> Co-authored-by: chris <github@onechris.mozmail.com> Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz> Co-authored-by: Aurora <auroranova8756@gmail.com>
173 lines
5.3 KiB
Plaintext
173 lines
5.3 KiB
Plaintext
plugins {
|
|
// Allow blossom to mark sources root of templates
|
|
idea
|
|
alias(libs.plugins.blossom)
|
|
id("geyser.publish-conventions")
|
|
id("io.freefair.lombok")
|
|
}
|
|
|
|
dependencies {
|
|
constraints {
|
|
implementation(libs.raknet) // Ensure protocol does not override the RakNet version
|
|
}
|
|
|
|
api(projects.common)
|
|
api(projects.api)
|
|
|
|
api(libs.yaml) // Used for extensions
|
|
annotationProcessor(libs.configurate.`interface`.ap)
|
|
api(libs.configurate.`interface`)
|
|
implementation(libs.configurate.yaml)
|
|
api(libs.guava)
|
|
|
|
compileOnly(libs.gson.record.factory) {
|
|
isTransitive = false
|
|
}
|
|
|
|
// Fastutil Maps
|
|
implementation(libs.bundles.fastutil)
|
|
|
|
// Network libraries
|
|
implementation(libs.websocket)
|
|
|
|
api(libs.bundles.protocol) {
|
|
exclude("com.fasterxml.jackson.core", "jackson-annotations")
|
|
}
|
|
|
|
api(libs.minecraftauth) {
|
|
exclude("com.google.code.gson", "gson")
|
|
}
|
|
api(libs.mcprotocollib) {
|
|
exclude("io.netty", "netty-all")
|
|
exclude("net.raphimc", "MinecraftAuth")
|
|
}
|
|
|
|
implementation(libs.raknet) {
|
|
exclude("io.netty", "*")
|
|
}
|
|
|
|
|
|
// Network dependencies we are updating ourselves
|
|
api(libs.netty.handler)
|
|
implementation(libs.netty.codec.haproxy)
|
|
|
|
api(libs.netty.transport.native.epoll) { artifact { classifier = "linux-x86_64" } }
|
|
implementation(libs.netty.transport.native.epoll) { artifact { classifier = "linux-aarch_64" } }
|
|
// kqueue is macos only
|
|
implementation(libs.netty.transport.native.kqueue) { artifact { classifier = "osx-x86_64" } }
|
|
api(libs.netty.transport.native.io.uring) { artifact { classifier = "linux-x86_64" } }
|
|
implementation(libs.netty.transport.native.io.uring) { artifact { classifier = "linux-aarch_64" } }
|
|
|
|
// Adventure text serialization
|
|
api(libs.bundles.adventure)
|
|
|
|
// command library
|
|
api(libs.cloud.core)
|
|
|
|
api(libs.erosion.common) {
|
|
isTransitive = false
|
|
}
|
|
|
|
// Test
|
|
testImplementation(libs.junit)
|
|
testImplementation(libs.gson.runtime) // Record support
|
|
testImplementation(libs.mockito)
|
|
|
|
// Annotation Processors
|
|
compileOnly(projects.ap)
|
|
|
|
annotationProcessor(projects.ap)
|
|
|
|
api(libs.events)
|
|
|
|
api(libs.bstats)
|
|
}
|
|
|
|
tasks.processResources {
|
|
// This is solely for backwards compatibility for other programs that used this file before the switch to gradle.
|
|
// It used to be generated by the maven Git-Commit-Id-Plugin
|
|
filesMatching("git.properties") {
|
|
val info = GitInfo()
|
|
expand(
|
|
"branch" to info.branch,
|
|
"buildNumber" to info.buildNumber,
|
|
"projectVersion" to info.version,
|
|
"commit" to info.commit,
|
|
"commitAbbrev" to info.commitAbbrev,
|
|
"commitMessage" to info.commitMessage,
|
|
"repository" to info.repository
|
|
)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
blossom {
|
|
val info = GitInfo()
|
|
javaSources {
|
|
property("version", info.version)
|
|
property("gitVersion", info.gitVersion)
|
|
property("buildNumber", info.buildNumber.toString())
|
|
property("branch", info.branch)
|
|
property("commit", info.commit)
|
|
property("repository", info.repository)
|
|
property("devVersion", info.isDev.toString())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fun isDevBuild(branch: String, repository: String): Boolean {
|
|
return branch != "master" || repository.equals("https://github.com/GeyserMC/Geyser", ignoreCase = true).not()
|
|
}
|
|
|
|
inner class GitInfo {
|
|
val branch: String
|
|
val commit: String
|
|
val commitAbbrev: String
|
|
|
|
val gitVersion: String
|
|
val version: String
|
|
val buildNumber: Int
|
|
|
|
val commitMessage: String
|
|
val repository: String
|
|
|
|
val isDev: Boolean
|
|
|
|
init {
|
|
branch = indraGit.branchName() ?: "DEV"
|
|
|
|
val commit = indraGit.commit()
|
|
this.commit = commit?.name ?: "0".repeat(40)
|
|
commitAbbrev = commit?.name?.substring(0, 7) ?: "0".repeat(7)
|
|
|
|
gitVersion = "git-${branch}-${commitAbbrev}"
|
|
|
|
val git = indraGit.git()
|
|
commitMessage = git?.commit()?.message ?: ""
|
|
repository = git?.repository?.config?.getString("remote", "origin", "url") ?: ""
|
|
|
|
buildNumber = buildNumber()
|
|
isDev = isDevBuild(branch, repository)
|
|
val projectVersion = if (isDev) project.version else projectVersion(project)
|
|
version = "$projectVersion ($gitVersion)"
|
|
}
|
|
}
|
|
|
|
// Manual task to download the bedrock data files from the CloudburstMC/Data repository
|
|
// Invoke with ./gradlew :core:downloadBedrockData --suffix=1_20_70
|
|
// Set suffix to the current Bedrock version
|
|
tasks.register<DownloadFilesTask>("downloadBedrockData") {
|
|
urls = listOf(
|
|
"https://raw.githubusercontent.com/CloudburstMC/Data/master/entity_identifiers.dat",
|
|
"https://raw.githubusercontent.com/CloudburstMC/Data/master/block_palette.nbt",
|
|
"https://raw.githubusercontent.com/CloudburstMC/Data/master/creative_items.json",
|
|
"https://raw.githubusercontent.com/CloudburstMC/Data/master/runtime_item_states.json",
|
|
"https://raw.githubusercontent.com/CloudburstMC/Data/master/stripped_biome_definitions.json"
|
|
)
|
|
suffixedFiles = listOf("block_palette.nbt", "creative_items.json", "runtime_item_states.json")
|
|
|
|
destinationDir = "$projectDir/src/main/resources/bedrock"
|
|
}
|