Move to name-proposal and update enigma/cfr (#2708)

* Move to name-proposal and update enigma/cfr

* Update name-proposal

* Update name-proposal
This commit is contained in:
modmuss50 2021-09-28 16:17:36 +01:00 committed by GitHub
parent 2cecd75ae7
commit 66374095fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 38 deletions

View File

@ -15,6 +15,7 @@ buildscript {
classpath 'net.fabricmc:tiny-remapper:0.6.0'
classpath "net.fabricmc.unpick:unpick:${project.unpick_version}"
classpath "net.fabricmc.unpick:unpick-format-utils:${project.unpick_version}"
classpath "net.fabricmc:name-proposal:${project.name_proposal_version}"
}
}
@ -73,7 +74,7 @@ def unpickMetaFile = file("unpick-definitions/unpick.json")
dependencies {
enigmaRuntime "cuchaz:enigma-swing:${project.enigma_version}:all"
enigmaRuntime "net.fabricmc:stitch:${project.stitch_version}"
enigmaRuntime "net.fabricmc:name-proposal:${project.name_proposal_version}"
javadocClasspath "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
javadocClasspath "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
javadocClasspath "com.google.code.findbugs:jsr305:3.0.2" // for some other jsr annotations
@ -108,16 +109,15 @@ import cuchaz.enigma.command.MapSpecializedMethodsCommand
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.commands.tinyv2.CommandMergeTinyV2
import net.fabricmc.stitch.commands.tinyv2.CommandProposeV2FieldNames
import net.fabricmc.stitch.commands.tinyv2.CommandReorderTinyV2
import net.fabricmc.stitch.merge.JarMerger
import net.fabricmc.tinyremapper.OutputConsumerPath
import net.fabricmc.tinyremapper.TinyRemapper
import net.fabricmc.tinyremapper.TinyUtils
import net.fabricmc.nameproposal.MappingNameCompleter
import org.apache.commons.io.FileUtils
import org.objectweb.asm.ClassVisitor
import org.objectweb.asm.FieldVisitor
@ -618,26 +618,6 @@ task importMappingsOfficial(dependsOn: invertIntermediary) {
}
}
task buildTinyWithEnum(dependsOn: "mergeTiny", type: FileOutput) {
group = buildMappingGroup
def noEnum = mergeTiny.output
output = new File(tempDir, "named-with-enum.tiny")
outputs.file(output)
outputs.upToDateWhen { false }
doLast {
logger.lifecycle(":seeking auto-mappable fields")
String[] argsPropose = [
mergedFile.getAbsolutePath(), // must use official jar
noEnum.getAbsolutePath(),
output.getAbsolutePath()
]
new CommandProposeFieldNames().run(argsPropose)
}
}
task mapNamedJar(dependsOn: ["mergeV2", "unpickIntermediaryJar"]) {
group = mapJarGroup
inputs.files downloadMcLibs.outputs.files.files
@ -731,7 +711,7 @@ build.dependsOn constantsJar
task insertAutoGeneratedEnumMappings(dependsOn : [buildYarnTiny,mapIntermediaryJar], type : FileOutput){
group = buildMappingGroup
def noEnumV2 = buildYarnTiny.v2Output
File noEnumV2 = buildYarnTiny.v2Output
output = new File(tempDir, "unmerged-named-v2-with-enum.tiny")
outputs.upToDateWhen { false }
@ -739,14 +719,12 @@ task insertAutoGeneratedEnumMappings(dependsOn : [buildYarnTiny,mapIntermediaryJ
doLast {
logger.lifecycle(":seeking auto-mappable fields for unmerged mappings")
String[] argsProposeV2 = [
intermediaryJar.getAbsolutePath(), // must use intermediary jar
noEnumV2.getAbsolutePath(),
output.getAbsolutePath(),
"false" // don't replace existing names right now
]
new CommandProposeV2FieldNames().run(argsProposeV2)
MappingNameCompleter.completeNames(
intermediaryJar.toPath(),
noEnumV2.toPath(),
downloadIntermediary.dest.toPath(),
output.toPath()
)
}
}

View File

@ -1,13 +1,13 @@
{
"services" : {
"name_proposal": {
"id": "stitch:name_proposal"
"id": "nameproposal:name_proposal"
},
"jar_indexer": {
"id": "stitch:jar_indexer"
"id": "nameproposal:jar_indexer"
},
"obfuscation_test": {
"id": "stitch:intermediary_obfuscation_test",
"id": "nameproposal:intermediary_obfuscation_test",
"args": {}
}
}

View File

@ -1,12 +1,13 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
enigma_version=1.4.2
enigma_version=1.4.5
stitch_version=0.6.1
unpick_version=2.2.0
cfr_version=0.0.6
cfr_version=0.0.7
name_proposal_version=0.1.2
# Javadoc generation/linking
fabric_loader_version=0.11.6
jetbrains_annotations_version=21.0.1
jetbrains_annotations_version=22.0.0
mappingpoet_version=0.2.10