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

Maven Publishing #4

Closed
Darkhax opened this issue Oct 12, 2021 · 0 comments
Closed

Maven Publishing #4

Darkhax opened this issue Oct 12, 2021 · 0 comments

Comments

@Darkhax
Copy link
Collaborator

Darkhax commented Oct 12, 2021

The current Maven publishing configuration has a few issues and will require some changes to work with a multiproject setup. It looks like you've fixed most of these in your Clumps implementation but I would like to see some of these changes backported here.

Common Artifacts

The Common artifacts are not published currently. While normal Forge and Fabric mods can still use MultiLoader projects without the Common artifacts other MultiLoader projects would greatly benefit from having them available. For example imagine writing a CraftTweaker addon in a MultiLoader project. It would make sense for this addon to define new ZenCode natives in the Common project. The same would be true for a GameStage or WAILA addon.

Inconsistent Artifact Coordinates

The artifact coordinates for the Forge and Fabric artifacts are not consistent. The version number also differs between version and structure. There would be a lot to gain from standardizing this, especially now that we publish so many artifacts and other MultiLoader projects will be defining them three times. One benefit would be that it becomes easier to share coordinates with others, and make it easier to locate when traversing the maven manually. This will also aid in creating 3rd party tools or helpers to lookup artifacts. For example a helper method that accepts a group, project name, and version and will automatically create dependencies using the template "${group}:${name}-${platform}-${mc_version}:${version}" in the correct subprojects.

My proposed changes would include the following.

  • Group keeps the same structure. If there were any loader-specific references here they should be removed.
  • Name should be suffixed with the platform name (forge/fabric/common) and include the game version.
  • Version should continue on from the highest major version. So if Forge is 1.0.2 and Fabric is 8.0.12 the next joint release should become 9.0.13 for both.

Old Artifact Coordinates

// https://maven.blamejared.com/com/blamejared/clumps/Clumps/6.0.0.27/
group:'com.blamejared.clumps', name:'Clumps', version:'6.0.0.27'

// https://maven.blamejared.com/com/blamejared/clumps/Clumps-fabric-1.17.1/7.0.8/
group:'com.blamejared.clumps', name:'Clumps-fabric-1.17.1', version:'7.0.8'

New Artifact Coordinates

// https://maven.blamejared.com/com/blamejared/clumps/Clumps/6.0.0.27/
group:'com.blamejared.clumps', name:'Clumps-forge-1.17.1', version:'7.0.9'

// https://maven.blamejared.com/com/blamejared/clumps/Clumps-fabric-1.17.1/7.0.8/
group:'com.blamejared.clumps', name:'Clumps-fabric-1.17.1', version:'7.0.9'

Misc Improvements

  • Gradle module file is still published but only for forge. Should be disabled for both.
  • Forge's mapped artifact suppression should no longer be needed.
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

No branches or pull requests

1 participant