Skip to content

Commit

Permalink
Update CFR and Enigma (FabricMC#3794)
Browse files Browse the repository at this point in the history
* Update CFR and Enigma

* Update and fix build
  • Loading branch information
modmuss50 authored Feb 15, 2024
1 parent 65fa200 commit ec47d43
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
11 changes: 9 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import net.fabricmc.filament.task.UnpickJarTask
import net.fabricmc.filament.task.base.WithFileInput
import net.fabricmc.filament.task.base.WithFileOutput
import net.fabricmc.filament.task.enigma.MapSpecializedMethodsTask
import net.fabricmc.filament.task.mappingio.CompleteMappingsTask
import net.fabricmc.filament.task.mappingio.ConvertMappingsTask
import net.fabricmc.filament.task.mappingio.MergeMappingsTask
import net.fabricmc.mappingio.format.MappingFormat
Expand Down Expand Up @@ -179,12 +180,18 @@ tasks.register('checkMappings') {
tasks.register('mapSpecializedMethods', MapSpecializedMethodsTask) {
intermediaryJarFile = mapIntermediaryJar.output
mappings = mappingsDir
output = new File(tempDir, "yarn-mappings-v2.tiny")
output = new File(tempDir, "yarn-specialized-mappings-v2.tiny")

inputMappingsFormat = "enigma"
outputMappingsFormat = "tinyv2:intermediary:named"
}

tasks.register('completeMappings', CompleteMappingsTask) {
input = mapSpecializedMethods.output
output = new File(tempDir, "yarn-mappings-v2.tiny")
outputFormat = MappingFormat.TINY_2_FILE
}

tasks.register('convertToV1', ConvertMappingsTask) {
input = mapSpecializedMethods.output
output = new File(tempDir, "yarn-mappings.tiny")
Expand Down Expand Up @@ -303,7 +310,7 @@ build.dependsOn constantsJar
tasks.register('insertAutoGeneratedEnumMappings', FileInputOutput) {
dependsOn mapIntermediaryJar, downloadIntermediary
group = buildMappingGroup
input = mapSpecializedMethods.output
input = completeMappings.output
output = new File(tempDir, "unmerged-named-v2-with-enum.tiny")

inputs.file mapIntermediaryJar.output
Expand Down
2 changes: 1 addition & 1 deletion filament/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
filament_version=0.7.0
filament_version=0.7.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package net.fabricmc.filament.task.mappingio;

import java.io.IOException;
import java.util.Map;

import net.fabricmc.filament.task.base.WithFileInput;
import net.fabricmc.mappingio.MappingReader;
import net.fabricmc.mappingio.MappingWriter;
import net.fabricmc.mappingio.adapter.MappingNsCompleter;

public abstract class CompleteMappingsTask extends MappingOutputTask implements WithFileInput {
@Override
void run(MappingWriter writer) throws IOException {
var nsCompleter = new MappingNsCompleter(writer, Map.of("named", "intermediary"), true);
MappingReader.read(getInputPath(), nsCompleter);
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
org.gradle.configuration-cache=true

enigma_version=2.3.3
enigma_version=2.4.1
unpick_version=2.3.0
cfr_version=0.2.1
cfr_version=0.2.2
name_proposal_version=0.2.0
asm_version=9.6

Expand Down

0 comments on commit ec47d43

Please sign in to comment.