Update tiny remapper, register the new LV pattern as invalid with TR.
parent
2a040d03d7
commit
2ec1dd032f
|
@ -78,7 +78,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
// tinyfile management
|
// tinyfile management
|
||||||
implementation ('net.fabricmc:tiny-remapper:0.5.0')
|
implementation ('net.fabricmc:tiny-remapper:0.6.0')
|
||||||
implementation 'net.fabricmc:access-widener:2.0.0'
|
implementation 'net.fabricmc:access-widener:2.0.0'
|
||||||
implementation 'net.fabricmc:mapping-io:0.2.1'
|
implementation 'net.fabricmc:mapping-io:0.2.1'
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
|
@ -47,6 +48,11 @@ public final class TinyRemapperHelper {
|
||||||
.put("javax/annotation/concurrent/Immutable", "org/jetbrains/annotations/Unmodifiable")
|
.put("javax/annotation/concurrent/Immutable", "org/jetbrains/annotations/Unmodifiable")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Matches the new local variable naming format introduced in 21w37a.
|
||||||
|
*/
|
||||||
|
private static final Pattern MC_LV_PATTERN = Pattern.compile("\\$\\$\\d+");
|
||||||
|
|
||||||
private TinyRemapperHelper() {
|
private TinyRemapperHelper() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +64,7 @@ public final class TinyRemapperHelper {
|
||||||
.withMappings(out -> JSR_TO_JETBRAINS.forEach(out::acceptClass))
|
.withMappings(out -> JSR_TO_JETBRAINS.forEach(out::acceptClass))
|
||||||
.renameInvalidLocals(true)
|
.renameInvalidLocals(true)
|
||||||
.rebuildSourceFilenames(true)
|
.rebuildSourceFilenames(true)
|
||||||
|
.invalidLvNamePattern(MC_LV_PATTERN)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue