Skip to content

1.18 Maven builds are not useable #548

@pupnewfster

Description

@pupnewfster

After realizing that I had missed the fact that TOP publishes to a different maven in 1.18 (#506 (comment)) I did some testing and it appears that the builds on maven don't actually work unless I forcibly make the maven only support looking for the jar directly instead of supporting the maven pom file or gradle's module metadata by using:

metadataSources {
    artifact()
}

in the maven block. Alternatively each place TOP is referenced as a dependency

{
    transitive = false
}

could be added after the fg.deobf(...)

The first issue is that gradle 7's module files are being uploaded (which FG has a very hard time understanding and in general if you want your mod to be able to be used on maven), which can be fixed by just disabling the module metadata like this.

The second issue is that the mapped deps are being added to the pom file, these can either be sanitized and made optional like this or by just entirely removing all deps like so if you don't actually have some:

withXml {
    asNode().remove(asNode().dependencies)
}

Ideally these two issues will be fixed at some point rather than requiring mods use one of the workarounds I listed above.

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