Skip to content

Rename RunModel#getMods to getLoadedMods#158

Merged
shartte merged 4 commits intomainfrom
deprecate-runmodel-getmods
Sep 12, 2024
Merged

Rename RunModel#getMods to getLoadedMods#158
shartte merged 4 commits intomainfrom
deprecate-runmodel-getmods

Conversation

@Technici4n
Copy link
Copy Markdown
Member

@Technici4n Technici4n commented Sep 9, 2024

RunModel#getMods conflicts with NeoForgeExtension#getMods. This means that scripts typically have to write the following:

runs {
    xxx {
        mods = [neoForge.mods.xxx, neoForge.mods.yyy, neoForge.mods.zzz]
    }
}

The following syntax will work once this PR is merged:

runs {
    xxx {
        loadedMods = [mods.xxx, mods.yyy, mods.zzz]
    }
}

@Technici4n Technici4n requested a review from shartte September 9, 2024 22:53
@neoforged-pr-publishing
Copy link
Copy Markdown

neoforged-pr-publishing Bot commented Sep 9, 2024

  • Publish PR to GitHub Packages

Last commit published: 0c19ef6a62d8955401a9b796f49d133e3677dbb9.

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 #158' // https://github.com/neoforged/ModDevGradle/pull/158
        url 'https://prmaven.neoforged.net/ModDevGradle/pr158'
        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')
        }
    }
}

Comment thread src/main/java/net/neoforged/moddevgradle/dsl/RunModel.java
Comment thread src/main/java/net/neoforged/moddevgradle/dsl/RunModel.java Outdated
@Technici4n
Copy link
Copy Markdown
Member Author

@shartte thoughts on doing the breaking change immediately for MDG 2?

@shartte
Copy link
Copy Markdown
Collaborator

shartte commented Sep 10, 2024

@shartte thoughts on doing the breaking change immediately for MDG 2?

do it

we are in beta for a reason

@Technici4n Technici4n changed the title Deprecate RunModel#getMods in favor of getLoadedMods Rename RunModel#getMods to getLoadedMods Sep 10, 2024
Comment thread BREAKING_CHANGES.md Outdated
Co-authored-by: shartte <shartte@users.noreply.github.com>
@shartte shartte merged commit ea3ab17 into main Sep 12, 2024
@shartte shartte deleted the deprecate-runmodel-getmods branch September 12, 2024 21:42
@neoforged-releases
Copy link
Copy Markdown

🚀 This PR has been released as ModDevGradle version 2.0.29-beta.

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.

2 participants