Skip to content

Comments

[feat] Added library block to UMC setup#5

Open
poizzy wants to merge 3 commits intoTeamOpenIndustry:masterfrom
poizzy:master
Open

[feat] Added library block to UMC setup#5
poizzy wants to merge 3 commits intoTeamOpenIndustry:masterfrom
poizzy:master

Conversation

@poizzy
Copy link

@poizzy poizzy commented Feb 21, 2026

This PR adds the possibility to add libraries for UMC submods directly in the umc.json. Highly inspired by TeamOpenIndustry/UniversalModCore#204. Before this PR is mergeable, we need to enable the shade plugin in the build.gradle template, and add some aditional variable tags.

Usage:

"mod": {
    //...
    "libraries": [
        {
            "repository": "maven repositor like eg: https://repo1.maven.org/maven2/",
            "artifact": "groovy short form like: com.google.code.gson:gson:2.13.2"
            "path": "path to a jar file, alternative to repository + artifact"
            "type": "shade/implementation/runtime/(compile)"
            "relocate": "old.path | new.path"
            "onlyIn": ["1.12.2-forge", "1.17.1-forge"]
        }
    ]
}

}

if (library.isPath) {
depends.append(String.format("\t%s files('%s')", library.type, library.id)).append("\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might have to deal with flatDir above 1.17 as files won't work on there anymore

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