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/02/22 15:31]
jamieswhiteshirt Some structural cleanup, mention that Mixins are not remapped
tutorial:migratemappings [2021/04/07 12:38]
jamie remove superflous comment about non-Java languages
Line 3: Line 3:
 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. 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 ​only applies to most Java code. It will not automatically migrate mappings for Mixin targets ​or for code written in other language such as Kotlin or Scala.+**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 ===== ===== Loom 0.2.6 and above =====
Line 9: Line 9:
 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 sources will appear in ''​remappedSrc''​. Verify that the migration produced valid migrated code.   - Your migrated sources will appear in ''​remappedSrc''​. Verify that the migration produced valid migrated code.
   - Copy the sources from ''​remappedSrc''​ to the original folder. Keep the original sources backed up just in case.   - Copy the sources from ''​remappedSrc''​ to the original folder. Keep the original sources backed up just in case.
-  - Update your gradle.properties file according to the instructions in [[https://​modmuss50.me/​fabric.html?&​version=19w46b|this]] site.+  - Update your gradle.properties file according to the instructions in [[https://​modmuss50.me/​fabric.html|this]] site.
   - Refresh the Gradle project in your IDE.   - Refresh the Gradle project in your IDE.
   - Check and update any Mixin targets that may be outdated.   - Check and update any Mixin targets that may be outdated.
tutorial/migratemappings.txt ยท Last modified: 2021/04/07 12:38 by jamie