mirror of https://github.com/FabricMC/yarn.git
Add `yarnCommon` task that opens enigma with only common classes (#3193)
This commit is contained in:
parent
d1d71849fb
commit
f2b6c84e05
|
@ -39,6 +39,8 @@ Compared to launching Enigma externally, the gradle task adds a name guesser plu
|
||||||
### `yarnUnpicked`
|
### `yarnUnpicked`
|
||||||
Same as above, but unpicks the constants and launches Enigma with them. Can be a little bit slower to get going.
|
Same as above, but unpicks the constants and launches Enigma with them. Can be a little bit slower to get going.
|
||||||
|
|
||||||
|
### `yarnCommon`
|
||||||
|
Same as `yarn`, but will only show common classes.
|
||||||
|
|
||||||
### `build`
|
### `build`
|
||||||
Build a GZip'd archive containing a tiny mapping between official (obfuscated), [intermediary](https://github.com/FabricMC/intermediary), and yarn names ("named") and packages enigma mappings into a zip archive..
|
Build a GZip'd archive containing a tiny mapping between official (obfuscated), [intermediary](https://github.com/FabricMC/intermediary), and yarn names ("named") and packages enigma mappings into a zip archive..
|
||||||
|
|
74
build.gradle
74
build.gradle
|
@ -110,6 +110,7 @@ def clientJar = new File(cacheFilesMinecraft, "${minecraft_version}-client.jar")
|
||||||
def serverBootstrapJar = new File(cacheFilesMinecraft, "${minecraft_version}-serverboostrap.jar")
|
def serverBootstrapJar = new File(cacheFilesMinecraft, "${minecraft_version}-serverboostrap.jar")
|
||||||
// The real server jar, expected from the bootstrap
|
// The real server jar, expected from the bootstrap
|
||||||
def serverJar = new File(cacheFilesMinecraft, "${minecraft_version}-server.jar")
|
def serverJar = new File(cacheFilesMinecraft, "${minecraft_version}-server.jar")
|
||||||
|
def serverIntermediaryJar = file("${minecraft_version}-server-intermediary.jar")
|
||||||
def libraries = new File(cacheFilesMinecraft, "libraries")
|
def libraries = new File(cacheFilesMinecraft, "libraries")
|
||||||
def libs = new File("build/libs/")
|
def libs = new File("build/libs/")
|
||||||
|
|
||||||
|
@ -424,7 +425,6 @@ task mapIntermediaryJar(dependsOn: [downloadMcLibs, downloadIntermediary, mergeJ
|
||||||
//Force the task to always run
|
//Force the task to always run
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen { false }
|
||||||
|
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle(":mapping minecraft to intermediary")
|
logger.lifecycle(":mapping minecraft to intermediary")
|
||||||
def tinyInput = downloadIntermediary.dest
|
def tinyInput = downloadIntermediary.dest
|
||||||
|
@ -432,36 +432,37 @@ task mapIntermediaryJar(dependsOn: [downloadMcLibs, downloadIntermediary, mergeJ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task yarnUnpicked(dependsOn: "unpickIntermediaryJar", type: JavaExec) {
|
task mapServerIntermediaryJar(dependsOn: [downloadMcLibs, downloadIntermediary, extractServerJar]) {
|
||||||
group = yarnGroup
|
group = mapJarGroup
|
||||||
|
inputs.files downloadMcLibs.outputs.files.files
|
||||||
|
outputs.file(serverIntermediaryJar)
|
||||||
|
|
||||||
classpath = configurations.enigmaRuntime
|
//Force the task to always run
|
||||||
mainClass = 'cuchaz.enigma.gui.Main'
|
outputs.upToDateWhen { false }
|
||||||
|
|
||||||
args '-jar'
|
doLast {
|
||||||
args unpickedJar.getAbsolutePath()
|
logger.lifecycle(":mapping minecraft server to intermediary")
|
||||||
args '-mappings'
|
def tinyInput = downloadIntermediary.dest
|
||||||
args mappingsDir.getAbsolutePath()
|
mapJar(serverIntermediaryJar, serverJar, tinyInput, libraries, "official", "intermediary")
|
||||||
args '-profile'
|
}
|
||||||
args 'enigma_profile.json'
|
|
||||||
|
|
||||||
jvmArgs "-Xmx2048m"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task yarn(dependsOn: mapIntermediaryJar, type: JavaExec) {
|
task yarnUnpicked(dependsOn: "unpickIntermediaryJar", type: EnigmaTask) {
|
||||||
group = yarnGroup
|
group = yarnGroup
|
||||||
|
jar = unpickedJar
|
||||||
|
mappings = mappingsDir
|
||||||
|
}
|
||||||
|
|
||||||
classpath = configurations.enigmaRuntime
|
task yarn(dependsOn: mapIntermediaryJar, type: EnigmaTask) {
|
||||||
mainClass = 'cuchaz.enigma.gui.Main'
|
group = yarnGroup
|
||||||
|
jar = intermediaryJar
|
||||||
|
mappings = mappingsDir
|
||||||
|
}
|
||||||
|
|
||||||
args '-jar'
|
task yarnCommon(dependsOn: mapServerIntermediaryJar, type: EnigmaTask) {
|
||||||
args intermediaryJar.getAbsolutePath()
|
group = yarnGroup
|
||||||
args '-mappings'
|
jar = serverIntermediaryJar
|
||||||
args mappingsDir.getAbsolutePath()
|
mappings = mappingsDir
|
||||||
args '-profile'
|
|
||||||
args 'enigma_profile.json'
|
|
||||||
|
|
||||||
jvmArgs "-Xmx2048m"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task checkMappings(dependsOn: mapIntermediaryJar) {
|
task checkMappings(dependsOn: mapIntermediaryJar) {
|
||||||
|
@ -1051,3 +1052,28 @@ class WithV2FileOutput extends DefaultTask {
|
||||||
@OutputFile
|
@OutputFile
|
||||||
File v2Output
|
File v2Output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract class EnigmaTask extends JavaExec {
|
||||||
|
@Input
|
||||||
|
abstract Property<File> getJar()
|
||||||
|
|
||||||
|
@Input
|
||||||
|
abstract Property<File> getMappings()
|
||||||
|
|
||||||
|
EnigmaTask() {
|
||||||
|
classpath = project.configurations.enigmaRuntime
|
||||||
|
mainClass.set('cuchaz.enigma.gui.Main')
|
||||||
|
}
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
void exec() {
|
||||||
|
args '-jar'
|
||||||
|
args jar.get().absolutePath
|
||||||
|
args '-mappings'
|
||||||
|
args mappings.get().absolutePath
|
||||||
|
args '-profile'
|
||||||
|
args 'enigma_profile.json'
|
||||||
|
jvmArgs "-Xmx2048m"
|
||||||
|
super.exec()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue