Skip to content

Commit

Permalink
The Great Intermediary Update: fix Tiny mapping generation
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jun 28, 2019
1 parent 1a6f261 commit 4a5f2b3
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath "cuchaz:enigma:0.14.0.126"
classpath "net.fabricmc:stitch:0.2.1.56"
classpath "net.fabricmc:stitch:0.2.1.58"
classpath "commons-io:commons-io:2.6"
classpath "com.google.guava:guava:28.0-jre"
classpath 'de.undercouch:gradle-download-task:3.4.3'
Expand Down Expand Up @@ -49,7 +49,7 @@ configurations {
}

dependencies {
enigmaRuntime "net.fabricmc:stitch:0.2.1.56"
enigmaRuntime "net.fabricmc:stitch:0.2.1.58"
enigmaRuntime "cuchaz:enigma:0.14.0.126:all"
}

Expand All @@ -74,14 +74,14 @@ def libs = new File("build/libs/")
import cuchaz.enigma.command.CheckMappingsCommand
import cuchaz.enigma.command.ComposeMappingsCommand
import cuchaz.enigma.command.ConvertMappingsCommand
import cuchaz.enigma.command.InvertMappingsCommand
import com.google.common.hash.Hashing
import com.google.common.io.Files
import com.google.common.net.UrlEscapers
import groovy.io.FileType
import groovy.json.JsonSlurper
import net.fabricmc.stitch.commands.CommandMergeTiny
import net.fabricmc.stitch.commands.CommandProposeFieldNames
import net.fabricmc.stitch.commands.CommandReorderTiny
import net.fabricmc.stitch.commands.CommandRewriteIntermediary
import net.fabricmc.stitch.merge.JarMerger
import net.fabricmc.tinyremapper.OutputConsumerPath
Expand Down Expand Up @@ -252,13 +252,12 @@ task invertIntermediary(dependsOn: ["downloadIntermediary"], type: FileOutput) {
doLast {
logger.lifecycle(":building inverted intermediary")
String[] args = [
"tiny",
inputFile.getAbsolutePath(),
"tiny:intermediary:official",
outputFile.getAbsolutePath()
outputFile.getAbsolutePath(),
"intermediary", "official"
]

new InvertMappingsCommand().run(args)
new CommandReorderTiny().run(args)
}
}

Expand Down Expand Up @@ -371,6 +370,7 @@ task mergeTiny(dependsOn: ["buildYarnTiny", "invertIntermediary"], type: FileOut
def yarnTinyInput = buildYarnTiny.fileOutput
def intermediaryTinyInput = invertIntermediary.fileOutput

def unorderedResultMappings = new File(tempDir, "mappings-unordered.tiny")
def resultMappings = new File(tempDir, "mappings.tiny")
outputs.file(resultMappings)
fileOutput = resultMappings
Expand All @@ -380,14 +380,23 @@ task mergeTiny(dependsOn: ["buildYarnTiny", "invertIntermediary"], type: FileOut
doLast {
logger.lifecycle(":merging yarn and intermediary")
String[] args = [
yarnTinyInput.getAbsolutePath(),
intermediaryTinyInput.getAbsolutePath(),
resultMappings.getAbsolutePath(),
yarnTinyInput.getAbsolutePath(),
unorderedResultMappings.getAbsolutePath(),
"intermediary",
"official"
]

new CommandMergeTiny().run(args)

logger.lifecycle(":reordering merged intermediary")
String[] args2 = [
unorderedResultMappings.getAbsolutePath(),
resultMappings.getAbsolutePath(),
"official", "intermediary", "named"
]

new CommandReorderTiny().run(args2)
}
}

Expand Down

0 comments on commit 4a5f2b3

Please sign in to comment.