Forgix is a brand-new tool that allows Minecraft modders to combine numerous mod-loaders into one jar!
By default just running the task "mergeJars" should work if you've made your mod through the Architectury Template. Though don't forget to build the jars first!
forgix {
group = "org.example.mod" // This is the common group of the mod which by default in Architectury Template it's defined as "maven_group" in your gradle.properties. If this property is not defined then by default it'll fetch the group from the maven_group property in your gradle.properties
mergedJarName = "example-mod" // This is the name of the merged jar. If this property is not defined then by default it'll fetch the "archives_base_name" property with the "mod_version" property in your gradle.properties.
outputDir = "build/libs/Merged" // This is the output directory of the merged jar from the root project. If this property is not defined then by default it's set to "Merged".
forge {
projectName = "forge" // This is the name of the forge project. If this property is not defined then by default it'll set to "forge" since that's the name the Architectury Template uses.
jarLocation = "build/libs/example-mod.jar" // This is the location of the forge jar from the forge project. If this property is not defined then by default it fetches the jar with the shortest name.
additionalRelocate "org.my.lib" "forge.org.my.lib" // This is an important one to know. This is how you can remap additional packages such as libraries and stuff.
additionalRelocate "org.my.lib.another" "forge.org.my.lib.another"
mixin "forge.mixins.json" // This is in case if we didn't auto detect the forge mixins.
mixin "forge.mixins.another.json"
}
fabric {
projectName = "fabric" // This is the name of the fabric project. If this property is not defined then by default it'll set to "fabric" since that's the name the Architectury Template uses.
jarLocation = "build/libs/example-mod.jar" // This is the location of the fabric jar from the fabric project. If this property is not defined then by default it fetches the jar with the shortest name.
additionalRelocate "org.my.lib" "fabric.org.my.lib" // This is an important one to know. This is how you can remap additional packages such as libraries and stuff.
additionalRelocate "org.my.lib.another" "fabric.org.my.lib.another"
}
quilt {
projectName = "quilt" // This is the name of the quilt project. If this property is not defined then by default it'll set to "quilt" since that's the name the Architectury Template uses.
jarLocation = "build/libs/example-mod.jar" // This is the location of the quilt jar from the quilt project. If this property is not defined then by default it fetches the jar with the shortest name.
additionalRelocate "org.my.lib" "quilt.org.my.lib" // This is an important one to know. This is how you can remap additional packages such as libraries and stuff.
additionalRelocate "org.my.lib.another" "quilt.org.my.lib.another"
}
// For "custom", the "projectName" is a required value.
custom {
projectName = "sponge" // This is the name of the project. This is a required field.
jarLocation = "build/libs/example-mod.jar" // This is the location of the jar from the project. If this property is not defined then by default it fetches the jar with the shortest name.
additionalRelocate "org.my.lib" "sponge.org.my.lib" // This is an important one to know. This is how you can remap additional packages such as libraries and stuff.
additionalRelocate "org.my.lib.another" "sponge.org.my.lib.another"
}
custom {
projectName = "spigot" // This is the name of the project. This is a required field.
jarLocation = "build/libs/example-mod.jar" // This is the location of the jar from the project. If this property is not defined then by default it fetches the jar with the shortest name.
additionalRelocate "org.my.lib" "spigot.org.my.lib" // This is an important one to know. This is how you can remap additional packages such as libraries and stuff.
additionalRelocate "org.my.lib.another" "spigot.org.my.lib.another"
}
// This should be used to remove a duplicate package
removeDuplicate "org.example.mod.core"
}