User Tools

Site Tools


tutorial:migratemappings

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:migratemappings [2020/01/13 20:38]
jamie rewrite mercury section
tutorial:migratemappings [2021/04/07 12:38]
jamie remove superflous comment about non-Java languages
Line 1: Line 1:
 ====== Updating Yarn mappings in a Java codebase ====== ====== Updating Yarn mappings in a Java codebase ======
-====== Loom 0.2.6 and above =====+ 
-Currently, this process will only affect Java files.  ​+Loom allows semi-automatic updating of the mappings used in a Java codebase. Due to frequent changes in Yarn, this can be a useful tool for keeping a codebase up-to-date with the newest changes. 
 + 
 +**Note:** This automated process currently does not handle Mixins or reflection, instances of these will need to be manually updated. 
 + 
 +===== Loom 0.2.6 and above =====
  
 Say you want to migrate from 1.14.4 to 19w46b. ​   Say you want to migrate from 1.14.4 to 19w46b. ​  
  
-  - Go [[https://​modmuss50.me/​fabric.html?&​version=19w46b|here]], select ​''​19w46b''​, and copy the ''​yarn_mappings''​ value, for example ''​19w46b+build.1''​. ​ DO NOT modify your gradle.properties or build.gradle yet.   +  - Go [[https://​modmuss50.me/​fabric.html|here]],​ select ​the version to migrate to, and copy the ''​yarn_mappings''​ value, for example ''​19w46b+build.1''​. ​ DO NOT modify your gradle.properties or build.gradle yet.   
   - In the root of your gradle project, run ''​gradlew migrateMappings %%--%%mappings %%"​%%19w46b+build.1%%"​%%''​   - In the root of your gradle project, run ''​gradlew migrateMappings %%--%%mappings %%"​%%19w46b+build.1%%"​%%''​
-  - Your migrated ​source ​will appear in ''​remappedSrc''​. Verify ​your code was not nuked and copy it over+  - Your migrated ​sources ​will appear in ''​remappedSrc''​. Verify ​that the migration produced valid migrated ​code
-  - Update your gradle.properties file according to the instructions in [[https://​modmuss50.me/​fabric.html?&​version=19w46b|this]] site. +  - Copy the sources from ''​remappedSrc''​ to the original folder. Keep the original sources backed up just in case
-  - You're done.+  - Update your gradle.properties file according to the instructions in [[https://​modmuss50.me/​fabric.html|this]] site. 
 +  - Refresh the Gradle project in your IDE. 
 +  - Check and update any Mixin targets that may be outdated.
  
 === Additional customization ===  === Additional customization === 
Line 17: Line 23:
  
 === Reporting issues === === Reporting issues ===
-Loom uses [[https://​github.com/​CadixDev/​Mercury|Mercury]] to remap mods' ​source code, for problems with remapping please report issues to their [[https://​github.com/​CadixDev/​Mercury/​issues|issue tracker]], or discuss it through their communications channel (irc.esper.net #cadix). +Loom uses [[https://​github.com/​CadixDev/​Mercury|Mercury]] to remap Java source code, for problems with remapping please report issues to their [[https://​github.com/​CadixDev/​Mercury/​issues|issue tracker]], or discuss it through their communications channel (irc.esper.net #cadix).
- +
-====== Loom 0.2.5 and below ====== +
- +
-==== Requirements ====+
  
-  * Fabric-Loom 0.2.2 or above +===== Loom 0.2.2-0.2.5 =====
-  * A Java codebase ​Kotlin and Scala will not, currently, do. +
-  * Some assembly required+
  
-==== Instructions ====+Some assembly required.
  
   - Figure out your target mappings version. For example, "​net.fabricmc:​yarn:​1.14.1 Pre-Release 2+build.2"​.   - Figure out your target mappings version. For example, "​net.fabricmc:​yarn:​1.14.1 Pre-Release 2+build.2"​.
Line 35: Line 35:
     * "​inputDir"​ is the input directory, containing Java source code,     * "​inputDir"​ is the input directory, containing Java source code,
     * "​outputDir"​ is the output directory. It will be created if it is missing.     * "​outputDir"​ is the output directory. It will be created if it is missing.
-  - Copy the remapped source code to the input directory, if everything'​s fine,+  - Copy the remapped source code to the input directory, if everything'​s fine.
   - Hope for the best.   - Hope for the best.
  
tutorial/migratemappings.txt · Last modified: 2021/04/07 12:38 by jamie