mirror of https://github.com/FabricMC/yarn.git
Add decompileVineflower task, fix decompileCFR (#3834)
This commit is contained in:
parent
7ed7a7c43f
commit
0ec07ee8ba
23
build.gradle
23
build.gradle
|
@ -80,6 +80,7 @@ dependencies {
|
|||
javadocClasspath "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
|
||||
javadocClasspath "com.google.code.findbugs:jsr305:3.0.2" // for some other jsr annotations
|
||||
decompileClasspath "net.fabricmc:cfr:${project.cfr_version}"
|
||||
decompileClasspath "org.vineflower:vineflower:${project.vineflower_version}"
|
||||
mappingPoetJar "net.fabricmc:mappingpoet:${project.mappingpoet_version}"
|
||||
asm "org.ow2.asm:asm:${project.asm_version}"
|
||||
asm "org.ow2.asm:asm-tree:${project.asm_version}"
|
||||
|
@ -445,18 +446,30 @@ tasks.register('genFakeSource', JavaExec) {
|
|||
args mergeV2.outputFile.getAbsolutePath(), mapNamedJar.outputFile.getAbsolutePath(), fakeSourceDir.getAbsolutePath(), mcLibsDir.getAbsolutePath()
|
||||
}
|
||||
|
||||
tasks.register('decompileCFR', JavaExec) {
|
||||
def outputDir = layout.buildDirectory.file("namedSrc")
|
||||
def decompileOutput = layout.buildDirectory.file("namedSrc")
|
||||
|
||||
tasks.register("deleteDecompilerOutput", Delete) {
|
||||
delete decompileOutput
|
||||
}
|
||||
|
||||
tasks.register('decompileCFR', JavaExec) {
|
||||
dependsOn deleteDecompilerOutput
|
||||
dependsOn mapNamedJar
|
||||
mainClass = "org.benf.cfr.reader.Main"
|
||||
classpath.from configurations.decompileClasspath
|
||||
classpath.from minecraftLibraries
|
||||
args mapNamedJar.outputFile.getAbsolutePath(), "--outputdir", outputDir.absolutePath
|
||||
args mapNamedJar.outputFile.getAbsolutePath(), "--outputdir", decompileOutput.get().asFile.absolutePath
|
||||
}
|
||||
|
||||
doFirst {
|
||||
outputDir.deleteDir()
|
||||
tasks.register('decompileVineflower', JavaExec) {
|
||||
dependsOn deleteDecompilerOutput
|
||||
dependsOn mapNamedJar
|
||||
mainClass = "org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler"
|
||||
classpath.from configurations.decompileClasspath
|
||||
minecraftLibraries.files().forEach { file ->
|
||||
args "--add-external=${jar.absolutePath}"
|
||||
}
|
||||
args "--folder", mapNamedJar.outputFile.getAbsolutePath(), decompileOutput.get().asFile.absolutePath
|
||||
}
|
||||
|
||||
tasks.register("formatMappings", FormatMappingsTask) {
|
||||
|
|
|
@ -6,6 +6,7 @@ org.gradle.configuration-cache=true
|
|||
enigma_version=2.4.2
|
||||
unpick_version=2.3.0
|
||||
cfr_version=0.2.2
|
||||
vineflower_version=1.9.3
|
||||
name_proposal_version=0.2.0
|
||||
asm_version=9.6
|
||||
|
||||
|
|
Loading…
Reference in New Issue