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

Add code to handle old embedded server jar dependencies #3

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

shartte
Copy link
Collaborator

@shartte shartte commented Dec 6, 2024

In MC version 1.18, Mojang switched to embedding the original jar files instead of inlining the libraries into the server jar directly. Our code currently relies on the META-INF/libraries.list that ships since 1.18.

To support metadata for versions before 1.18, this PR will heuristically try to determine the GAV of libraries embedded in the server.

For each library declared for the client in the same version, it downloads the library and fingerprints each file in it to check against the server jar. For full matches, that library is added to the server library list. If there's a partial match, we also try to upgrade the library (against a known list), since for some reason in some versions the server jar contains newer libraries than the client.

@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Dec 6, 2024

  • Publish PR to GitHub Packages

Last commit published: d6eed99c44713ffcfde841cb9f891da5da7ac8fa.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #3' // https://github.com/neoforged/GradleMinecraftDependencies/pull/3
        url 'https://prmaven.neoforged.net/GradleMinecraftDependencies/pr3'
        content {

        }
    }
}

@shartte shartte changed the title Add code to handle old server jar dependencies Add code to handle old embedded server jar dependencies Dec 9, 2024
@neoforged-automation
Copy link

@shartte, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation neoforged-automation bot added needs rebase This Pull Request needs to be rebased before being merged and removed needs rebase This Pull Request needs to be rebased before being merged labels Dec 9, 2024
@shartte shartte merged commit 582ea5e into main Dec 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant