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

Fix named attributes in legacy failing when reading back data from Module Metadata #225

Merged
merged 7 commits into from
Jan 17, 2025

Conversation

shartte
Copy link
Collaborator

@shartte shartte commented Jan 8, 2025

We current have a bug where depending on a Mod that was published by MDG Legacy fails, due to that Mod containing our mappings attribute with the value "srg".

Gradle seems to be unable to map that back for some reason.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve dev.icosider:dripper-forge:1.20.1-1.0.0.
     Required by:
         root project :
      > No enum constant net.neoforged.moddevgradle.legacyforge.internal.MinecraftMappings.srg

@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jan 8, 2025

  • Publish PR to GitHub Packages

Last commit published: d7affafcb0aaa5da1cc75508ad489241677e3d82.

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 #225' // https://github.com/neoforged/ModDevGradle/pull/225
        url 'https://prmaven.neoforged.net/ModDevGradle/pr225'
        content {
            includeModule('net.neoforged.moddev', 'net.neoforged.moddev.gradle.plugin')
            includeModule('net.neoforged', 'moddev-gradle')
            includeModule('net.neoforged.moddev.repositories', 'net.neoforged.moddev.repositories.gradle.plugin')
            includeModule('net.neoforged.moddev.legacyforge', 'net.neoforged.moddev.legacyforge.gradle.plugin')
        }
    }
}

@Icosider
Copy link

Icosider commented Jan 8, 2025

The fix is working, I just checked it myself. Thanks

@shartte shartte marked this pull request as ready for review January 8, 2025 22:32
@shartte shartte requested a review from Matyrobbrt January 9, 2025 08:01
@Icosider
Copy link

The fix, as it turned out, partially works. The dependency is added, but the reobf call does not occur, thus the game starts with the SRG version of the mod, and not its reobf version.

@shartte
Copy link
Collaborator Author

shartte commented Jan 17, 2025

@Icosider Can you try again with the latest version of this PR?

@Icosider
Copy link

@shartte, It seems to be working pretty well. But at the moment, publishing to maven using multiple reobfuscate(task, sourceSet) remains problematic(perhaps it will relate to another PR)

@shartte
Copy link
Collaborator Author

shartte commented Jan 17, 2025

Yes the publishing side is another story and unaffected by this.

@shartte
Copy link
Collaborator Author

shartte commented Jan 17, 2025

@Matyrobbrt Can you review?

@shartte shartte merged commit 5b0a9bf into main Jan 17, 2025
6 checks passed
@shartte shartte deleted the named-attrs-legacy branch January 17, 2025 18:51
@neoforged-releases
Copy link

🚀 This PR has been released as ModDevGradle version 2.0.75.

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.

3 participants