Skip to content

MultiLoader and Multiversion Simultaneously #55

@USS-Shenzhou

Description

@USS-Shenzhou

Just trying to apply Forgix to my template project, not sure if Forgix supports merge all loader/versions into one jar? If so, what is the correct way to config it? It seems the README hasn't been updated for information about multiversion.

My project, TLDR, structure is like this:

Image

I tried this in my root project's build.gradle:

def java17Version = ['1.18.2', '1.19.4', '1.20.1'] as Set
def allVersion = ['1.18.2', '1.19.4', '1.20.1', '1.20.4', '1.21.1']
forgix {
    silence = false
    autoRun = true
    archiveClassifier = "all-platforms"
    archiveVersion = mainVersion

    allVersion.forEach { ver ->
        merge(ver + '-fabric') {
            inputJar = project(':' + ver + '-fabric').tasks.jar.archiveFile
        }

        if (ver in java17Version) {
            merge(ver + '-forge') {
                inputJar = project(':' + ver + '-forge').tasks.jar.archiveFile
            }
        } else {
            merge(ver + '-neoforge') {
                inputJar = project(':' + ver + '-neoforge').tasks.jar.archiveFile
            }
        }
    }
}

But apparently there must be somthing wrong and loaders can't recognize the merged jar.

complete source code: https://github.com/USS-Shenzhou/NeoParamita

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions