mirror of https://github.com/FabricMC/yarn.git
Generate mappings for specialized methods (#977)
This commit is contained in:
parent
ffb857ca3b
commit
f6883539a2
34
build.gradle
34
build.gradle
|
@ -7,7 +7,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "cuchaz:enigma:0.14.2.143"
|
classpath "cuchaz:enigma:0.14.2.144"
|
||||||
classpath "net.fabricmc:stitch:0.4.0.67"
|
classpath "net.fabricmc:stitch:0.4.0.67"
|
||||||
classpath "commons-io:commons-io:2.6"
|
classpath "commons-io:commons-io:2.6"
|
||||||
classpath "com.google.guava:guava:28.0-jre"
|
classpath "com.google.guava:guava:28.0-jre"
|
||||||
|
@ -49,7 +49,7 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
enigmaRuntime "net.fabricmc:stitch:0.4.0.67"
|
enigmaRuntime "net.fabricmc:stitch:0.4.0.67"
|
||||||
enigmaRuntime "cuchaz:enigma:0.14.2.143"
|
enigmaRuntime "cuchaz:enigma:0.14.2.144"
|
||||||
}
|
}
|
||||||
|
|
||||||
def setupGroup = "jar setup"
|
def setupGroup = "jar setup"
|
||||||
|
@ -75,6 +75,7 @@ import com.google.common.collect.Iterables
|
||||||
import cuchaz.enigma.command.CheckMappingsCommand
|
import cuchaz.enigma.command.CheckMappingsCommand
|
||||||
import cuchaz.enigma.command.ComposeMappingsCommand
|
import cuchaz.enigma.command.ComposeMappingsCommand
|
||||||
import cuchaz.enigma.command.ConvertMappingsCommand
|
import cuchaz.enigma.command.ConvertMappingsCommand
|
||||||
|
import cuchaz.enigma.command.MapSpecializedMethodsCommand
|
||||||
import groovy.io.FileType
|
import groovy.io.FileType
|
||||||
import groovy.json.JsonSlurper
|
import groovy.json.JsonSlurper
|
||||||
import net.fabricmc.stitch.commands.CommandMergeTiny
|
import net.fabricmc.stitch.commands.CommandMergeTiny
|
||||||
|
@ -344,7 +345,7 @@ task checkMappings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildYarnTiny(dependsOn: mergeJars, type: WithV2FileOutput) {
|
task buildYarnTiny(dependsOn: mapIntermediaryJar, type: WithV2FileOutput) {
|
||||||
group = buildMappingGroup
|
group = buildMappingGroup
|
||||||
inputs.dir mappingsDir
|
inputs.dir mappingsDir
|
||||||
if (!libs.exists()) {
|
if (!libs.exists()) {
|
||||||
|
@ -359,22 +360,19 @@ task buildYarnTiny(dependsOn: mergeJars, type: WithV2FileOutput) {
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle(":generating tiny mappings")
|
logger.lifecycle(":generating tiny mappings")
|
||||||
|
|
||||||
String[] v1Args = [
|
new MapSpecializedMethodsCommand().run(
|
||||||
"enigma",
|
intermediaryJar.getAbsolutePath(),
|
||||||
mappingsDir.getAbsolutePath(),
|
"enigma",
|
||||||
"tiny:intermediary:named",
|
mappingsDir.getAbsolutePath(),
|
||||||
v1Output.getAbsolutePath()
|
"tinyv2:intermediary:named",
|
||||||
]
|
v2Output.getAbsolutePath()
|
||||||
|
)
|
||||||
|
|
||||||
String[] v2Args = [
|
new ConvertMappingsCommand().run(
|
||||||
"enigma",
|
"tinyv2",
|
||||||
mappingsDir.getAbsolutePath(),
|
v2Output.getAbsolutePath(),
|
||||||
"tinyv2:intermediary:named",
|
"tiny:intermediary:named",
|
||||||
v2Output.getAbsolutePath()
|
v1Output.getAbsolutePath())
|
||||||
]
|
|
||||||
|
|
||||||
new ConvertMappingsCommand().run(v1Args)
|
|
||||||
new ConvertMappingsCommand().run(v2Args)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue