mirror of https://github.com/FabricMC/yarn.git
Revert the way intermediary is downloaded, as I need to run some tasks when there isnt an intermediary version present for the given version.
This can be re-evaluated at a later date
This commit is contained in:
parent
630bd1451b
commit
30192a5bb7
40
build.gradle
40
build.gradle
|
@ -45,13 +45,11 @@ configurations {
|
||||||
cacheChangingModulesFor 0, "seconds"
|
cacheChangingModulesFor 0, "seconds"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
intermediary
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
enigmaRuntime "net.fabricmc:stitch:0.3.0.66"
|
enigmaRuntime "net.fabricmc:stitch:0.3.0.66"
|
||||||
enigmaRuntime "cuchaz:enigma:0.14.2.134"
|
enigmaRuntime "cuchaz:enigma:0.14.2.134"
|
||||||
intermediary "net.fabricmc:intermediary:$minecraft_version"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def setupGroup = "jar setup"
|
def setupGroup = "jar setup"
|
||||||
|
@ -185,26 +183,12 @@ task downloadMcJars(dependsOn: downloadWantedVersionManifest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task extractIntermediary(type: FileOutput) {
|
task downloadIntermediary(type: Download) {
|
||||||
group = buildMappingGroup
|
group = buildMappingGroup
|
||||||
|
def url = "https://github.com/FabricMC/intermediary/raw/master/mappings/${minecraft_version}.tiny"
|
||||||
def v1Input = Iterables.getOnlyElement(configurations.intermediary.files)
|
src UrlEscapers.urlFragmentEscaper().escape(url)
|
||||||
|
dest new File(cacheFilesMinecraft, "${minecraft_version}-intermediary.tiny")
|
||||||
output = new File(cacheFilesMinecraft.getPath(), "${minecraft_version}-intermediary.tiny")
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
FileSystems.newFileSystem(v1Input.toPath(), null).withCloseable {
|
|
||||||
Path fileToExtract = it.getPath("mappings/mappings.tiny")
|
|
||||||
try {
|
|
||||||
Files.copy(fileToExtract, output.toPath())
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
} // fuck groovy
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
task mergeJars(dependsOn: downloadMcJars) {
|
task mergeJars(dependsOn: downloadMcJars) {
|
||||||
group = setupGroup
|
group = setupGroup
|
||||||
|
@ -261,9 +245,9 @@ task downloadMcLibs(dependsOn: downloadWantedVersionManifest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task invertIntermediary(dependsOn: extractIntermediary, type: FileOutput) {
|
task invertIntermediary(dependsOn: downloadIntermediary, type: FileOutput) {
|
||||||
group = buildMappingGroup
|
group = buildMappingGroup
|
||||||
def v1Input = extractIntermediary.output
|
def v1Input = downloadIntermediary.dest
|
||||||
|
|
||||||
output = new File(cacheFilesMinecraft, "${minecraft_version}-intermediary-inverted.tiny")
|
output = new File(cacheFilesMinecraft, "${minecraft_version}-intermediary-inverted.tiny")
|
||||||
outputs.file(output)
|
outputs.file(output)
|
||||||
|
@ -283,9 +267,9 @@ task invertIntermediary(dependsOn: extractIntermediary, type: FileOutput) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task patchIntermediary(dependsOn: [mergeJars, extractIntermediary]) {
|
task patchIntermediary(dependsOn: [mergeJars, downloadIntermediary]) {
|
||||||
group = buildMappingGroup
|
group = buildMappingGroup
|
||||||
def intermediaryTinyInput = extractIntermediary.output
|
def intermediaryTinyInput = downloadIntermediary.dest
|
||||||
|
|
||||||
def outputFile = new File(cacheFilesMinecraft, "${minecraft_version}-intermediary-full.tiny")
|
def outputFile = new File(cacheFilesMinecraft, "${minecraft_version}-intermediary-full.tiny")
|
||||||
outputs.file(outputFile)
|
outputs.file(outputFile)
|
||||||
|
@ -305,7 +289,7 @@ task patchIntermediary(dependsOn: [mergeJars, extractIntermediary]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task mapIntermediaryJar(dependsOn: [downloadMcLibs, extractIntermediary, mergeJars]) {
|
task mapIntermediaryJar(dependsOn: [downloadMcLibs, downloadIntermediary, mergeJars]) {
|
||||||
group = mapJarGroup
|
group = mapJarGroup
|
||||||
inputs.files downloadMcLibs.outputs.files.files
|
inputs.files downloadMcLibs.outputs.files.files
|
||||||
outputs.file(intermediaryJar)
|
outputs.file(intermediaryJar)
|
||||||
|
@ -315,7 +299,7 @@ task mapIntermediaryJar(dependsOn: [downloadMcLibs, extractIntermediary, mergeJa
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle(":mapping minecraft to intermediary")
|
logger.lifecycle(":mapping minecraft to intermediary")
|
||||||
def tinyInput = extractIntermediary.output
|
def tinyInput = downloadIntermediary.dest
|
||||||
mapJar(intermediaryJar, mergedFile, tinyInput, libraries, "official", "intermediary")
|
mapJar(intermediaryJar, mergedFile, tinyInput, libraries, "official", "intermediary")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,8 +475,8 @@ task mapYarnJar(dependsOn: [compressTiny, mapIntermediaryJar]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task exportMappingsOfficial(dependsOn: extractIntermediary) {
|
task exportMappingsOfficial(dependsOn: downloadIntermediary) {
|
||||||
def composeInput = extractIntermediary.output
|
def composeInput = downloadIntermediary.dest
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle(":exporting mappings")
|
logger.lifecycle(":exporting mappings")
|
||||||
|
|
Loading…
Reference in New Issue