User Tools

Site Tools


documentation:build_pipelines

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
build_pipelines [2019/02/04 23:48] – [Tools] irtimaleddocumentation:build_pipelines [2022/11/30 03:03] (current) – [Stitch] Removed the second "used" word in the second half of the paragraph. netuserget
Line 1: Line 1:
 ====== Fabric build pipelines ====== ====== Fabric build pipelines ======
  
-Gradle was chosen to build Fabricmods & tools.  This document will dive into the details of the pipeline steps, and the tools used.+Gradle was chosen to build Fabric mods.  This document will dive into the details of the pipeline steps, and the tools used.
  
-===== gradle build =====+===== Mod building =====
  
 +Fabric Mods' building depends on fabric loom Gradle plugin, which sets up the Minecraft dependency for Fabric Mods and properly remap their binaries to intermediary so that they can run across Minecraft snapshots as long as the part of vanilla Minecraft they depend on does not change.
  
 +The main job of loom: generate a Minecraft dependency from the Minecraft version and mappings references supplied, and convert the built mod to intermediary.
  
 +===== Fabric Toolchain =====
 +
 +So Minecraft is available as published by Mojang at [[https://launchermeta.mojang.com/mc/game/version_manifest.json|launchermeta]], how about Mappings? How does Fabric generate or develop mappings?
 +
 +Fabric has a mapping repository called Yarn. It uses Enigma, a deobfuscation tool.
 +
 +To set up Minecraft for Enigma, yarn uses stitch which can generate intermediary (as to allow Fabric mods to work across snapshots if the code they depend on did not change) and to merge minecraft client and server jars (so as to ease mapping/development).
  
 ===== Tools ===== ===== Tools =====
  
-  * Loom +==== Loom ==== 
-  Yarn [[https://github.com/FabricMC/yarn|Source]]  + 
-  Enigma +A Gradle plugin. Sets up the Minecraft dependency for Fabric Mods and properly remap their binaries to intermediary so that they can run across Minecraft snapshots as long as the part of vanilla Minecraft they depend on does not change. 
-  Stitch + 
-  Matcher +==== Yarn ==== 
-  Tiny-Remapper+Yarn is an open-source repository that contains all the mappings used to turn Minecraft obfuscated names into the useful names Fabric mod developers use. 
 + 
 +For more information on how to contribute mappings take a look here: [[https://github.com/FabricMC/yarn|Source]] 
 + 
 +==== Enigma ==== 
 + 
 +Enigma is a tool to deobfuscate Java applications, like Minecraft.  Fabric uses a fork of Enigma that has been heavily modified to fix lots of bug and work more effectively with Yarn files. 
 + 
 +The code is not for the faint of heart but can be seen here [[https://github.com/FabricMC/Enigma|Source]] 
 +==== Stitch ==== 
 + 
 +Stitch generates and manages intermediary mappings of APIs across Minecraft versions. Each intermediary mapping is uploaded to [[https://github.com/FabricMC/intermediary/tree/master/mappings|FabricMC/intermediary]] and is used as part of Yarn's build process. 
 + 
 +==== Matcher ==== 
 + 
 +Matcher is a project used to update intermediary and yarn when a new Minecraft version comes out. Not directly involved in Fabric toolchain, it is still integral as it enables Fabric to swiftly update. 
 + 
 +==== Tiny-Remapper ==== 
 + 
 +The tool utilized by loom to convert yarn-named mod binaries to intermediary-named usable mod binaries and by fabric loader to convert obfuscated vanilla Minecraft to intermediary. 
 + 
 +==== Mercury ==== 
 + 
 +[[https://github.com/CadixDev/Mercury|Mercury]] is a library based on [[https://www.eclipse.org/jdt/core/index.php|Eclipse's JDT Core]] that allows for [[https://github.com/CadixDev/Mercury/blob/2027ef98c6b835eb516bf8c59153a4acd44ee57f/src/main/java/org/cadixdev/mercury/SourceProcessor.java|processors]] to be run against Java codebases. Mercury's prime use is for applying de-obfuscation mappings to a codebases, and includes a [[https://github.com/CadixDev/Mercury/blob/6379e58e914160b5c9d9f4e822d5269586e2260b/src/main/java/org/cadixdev/mercury/remapper/MercuryRemapper.java|processor for doing just that]]. Mercury's open nature allows for anyone to write a processor and for multiple to be run (consequtively) in one go - for example there is an external processor, [[https://github.com/CadixDev/MercuryMixin|MercuryMixin]], that is capable of remapping usage of the Mixin library.  
 + 
 +Mercury is utilised by Loom for its [[tutorial:migratemappings|migrateMappings task]], allowing mods to be quickly updated to newer versions of Yarn without tedious manual work. Since the Tiny format isn't directly supported by Lorenz, the mapping library used by Mercury, [[https://github.com/FabricMC/lorenz-tiny|lorenz-tiny]] exists to read and write Lorenz mapping sets using the existing [[https://github.com/FabricMC/tiny-mappings-parser|tiny-mappings-parser]] library. 
 + 
 +Mercury is maintained and developed by a third party, the [[https://www.cadixdev.org/|Cadix Development Team]]. Queries and bug reports should be directed to them. 
 + 
 +  * Mercury Bug Tracker: https://github.com/CadixDev/Mercury/issues 
 +  * Cadix Development Team IRC Channel: #cadix on [[https://esper.net/|EsperNet]]
documentation/build_pipelines.1549324088.txt.gz · Last modified: 2019/02/04 23:48 by irtimaled