mirror of https://github.com/FabricMC/yarn.git
nothing to see here, move right along
This commit is contained in:
parent
b62276acb1
commit
45d2c9b6db
17
README.md
17
README.md
|
@ -1,6 +1,6 @@
|
|||
# Publicly Open Mapping Files
|
||||
# Yarn
|
||||
|
||||
POMF is a set of open, unencumbered Minecraft mappings, free for everyone to use under the Creative Commons Zero license. The intention is to let
|
||||
Yarn is a set of open, unencumbered Minecraft mappings, free for everyone to use under the Creative Commons Zero license. The intention is to let
|
||||
everyone mod Minecraft freely and openly, while also being able to innovate and process the mappings as they see fit.
|
||||
|
||||
The current version targets Minecraft version **18w49a**.
|
||||
|
@ -14,21 +14,20 @@ However, it is a good idea to consult name changes with other people - use pull
|
|||
### Getting Started
|
||||
|
||||
1. Fork and clone the repo
|
||||
2. Run `./gradlew pomf` (Linux, macOS) or `gradlew pomf` (Windows)
|
||||
2. Run `./gradlew yarn` (Linux, macOS) or `gradlew yarn` (Windows)
|
||||
3. Profit
|
||||
|
||||
## Gradle
|
||||
|
||||
POMF uses Gradle to provide a number of utility tasks for working with POMF.
|
||||
Yarn uses Gradle to provide a number of utility tasks for working with the mappings.
|
||||
|
||||
### `download`
|
||||
Downloads the client and server Minecraft jars for the current Minecraft version to `.gradle/minecraft`
|
||||
|
||||
### `mergeJars`
|
||||
Merges the client and server jars into one merged jar, located at `VERSION-merged.jar` in the POMF directory where `VERSION` is the current Minecraft version.
|
||||
Merges the client and server jars into one merged jar, located at `VERSION-merged.jar` in the mappings directory where `VERSION` is the current Minecraft version.
|
||||
|
||||
### `setupPomf`
|
||||
### `setupYarn`
|
||||
`download` and `mergeJars`
|
||||
|
||||
### `pomf`
|
||||
`setupPomf` and download and launch the latest version of Enigma automatically configured to use the merged jar and the mappings.
|
||||
### `yarn`
|
||||
`setupYarn` and download and launch the latest version of Enigma automatically configured to use the merged jar and the mappings.
|
||||
|
|
34
build.gradle
34
build.gradle
|
@ -28,7 +28,7 @@ def ENV = System.getenv()
|
|||
// Fetch build number from Jenkins
|
||||
def build_number = ENV.BUILD_NUMBER ?: "local"
|
||||
|
||||
def pomfVersion = "${minecraft_version}.$build_number"
|
||||
def yarnVersion = "${minecraft_version}.$build_number"
|
||||
|
||||
|
||||
repositories {
|
||||
|
@ -183,11 +183,11 @@ task mergeJars(dependsOn: downloadMcJars) {
|
|||
|
||||
}
|
||||
|
||||
task setupPomf(dependsOn: mergeJars) {
|
||||
task setupYarn(dependsOn: mergeJars) {
|
||||
|
||||
}
|
||||
|
||||
task pomf(dependsOn: setupPomf) {
|
||||
task yarn(dependsOn: setupYarn) {
|
||||
doLast {
|
||||
ant.java(
|
||||
classname: 'cuchaz.enigma.Main',
|
||||
|
@ -204,7 +204,7 @@ task pomf(dependsOn: setupPomf) {
|
|||
task buildEnigma(type: Zip) {
|
||||
from mappingsDir
|
||||
include "**/*"
|
||||
archiveName "pomf-enigma-${pomfVersion}.zip"
|
||||
archiveName "yarn-enigma-${yarnVersion}.zip"
|
||||
destinationDir(file("build/libs"))
|
||||
}
|
||||
|
||||
|
@ -227,14 +227,14 @@ task downloadIntermediary(type: Download){
|
|||
dest new File(cacheFilesMinecraft, "${minecraft_version}-intermediary.tiny")
|
||||
}
|
||||
|
||||
task buildPomfTiny(dependsOn: "mergeJars",type: FileOutput) {
|
||||
task buildYarnTiny(dependsOn: "mergeJars",type: FileOutput) {
|
||||
inputs.dir mappingsDir
|
||||
if (!libs.exists()) {
|
||||
libs.mkdirs()
|
||||
}
|
||||
|
||||
def pomfTiny = new File(tempDir, "pomf-mappings.tiny")
|
||||
fileOutput = pomfTiny
|
||||
def yarnTiny = new File(tempDir, "yarn-mappings.tiny")
|
||||
fileOutput = yarnTiny
|
||||
|
||||
outputs.upToDateWhen {return false}
|
||||
|
||||
|
@ -244,7 +244,7 @@ task buildPomfTiny(dependsOn: "mergeJars",type: FileOutput) {
|
|||
String[] args = [
|
||||
mergedFile.getAbsolutePath(),
|
||||
mappingsDir.getAbsolutePath(),
|
||||
pomfTiny.getAbsolutePath(),
|
||||
yarnTiny.getAbsolutePath(),
|
||||
"official",
|
||||
"named"
|
||||
]
|
||||
|
@ -253,8 +253,8 @@ task buildPomfTiny(dependsOn: "mergeJars",type: FileOutput) {
|
|||
}
|
||||
}
|
||||
|
||||
task mergeTiny(dependsOn: ["buildPomfTiny", "downloadIntermediary"], type: FileOutput) {
|
||||
def pomfTinyInput = buildPomfTiny.fileOutput
|
||||
task mergeTiny(dependsOn: ["buildYarnTiny", "downloadIntermediary"], type: FileOutput) {
|
||||
def yarnTinyInput = buildYarnTiny.fileOutput
|
||||
def intermediaryTinyInput = downloadIntermediary.dest
|
||||
|
||||
def outputFile = new File(tempDir, "mappings.tiny")
|
||||
|
@ -264,9 +264,9 @@ task mergeTiny(dependsOn: ["buildPomfTiny", "downloadIntermediary"], type: FileO
|
|||
outputs.upToDateWhen {return false}
|
||||
|
||||
doLast {
|
||||
logger.lifecycle(":merging pomf and intermediary")
|
||||
logger.lifecycle(":merging yarn and intermediary")
|
||||
String[] args = [
|
||||
pomfTinyInput.getAbsolutePath(),
|
||||
yarnTinyInput.getAbsolutePath(),
|
||||
intermediaryTinyInput.getAbsolutePath(),
|
||||
outputFile.getAbsolutePath(),
|
||||
"intermediary",
|
||||
|
@ -279,7 +279,7 @@ task mergeTiny(dependsOn: ["buildPomfTiny", "downloadIntermediary"], type: FileO
|
|||
|
||||
task tinyJar(type: Jar, dependsOn: "mergeTiny") {
|
||||
outputs.upToDateWhen {return false}
|
||||
archiveName = "pomf-${pomfVersion}.jar"
|
||||
archiveName = "yarn-${yarnVersion}.jar"
|
||||
destinationDir(file("build/libs"))
|
||||
classifier = ""
|
||||
from (mergeTiny.fileOutput) {
|
||||
|
@ -288,7 +288,7 @@ task tinyJar(type: Jar, dependsOn: "mergeTiny") {
|
|||
}
|
||||
|
||||
task compressTiny(dependsOn: ["tinyJar", "mergeTiny"], type: FileOutput){
|
||||
def outputFile = new File(libs, "pomf-tiny-${pomfVersion}.gz")
|
||||
def outputFile = new File(libs, "yarn-tiny-${yarnVersion}.gz")
|
||||
outputs.file(outputFile)
|
||||
fileOutput = outputFile
|
||||
|
||||
|
@ -374,7 +374,7 @@ task mapJar(dependsOn: [downloadMcLibs, build]) {
|
|||
mappedFile.delete()
|
||||
}
|
||||
|
||||
def tinyInput = new File("build/libs/pomf-tiny-${pomfVersion}.gz").toPath()
|
||||
def tinyInput = new File("build/libs/yarn-tiny-${yarnVersion}.gz").toPath()
|
||||
|
||||
def remapper = TinyRemapper.newRemapper()
|
||||
.withMappings(TinyUtils.createTinyMappingProvider(tinyInput, "official", "named"))
|
||||
|
@ -405,8 +405,8 @@ publishing {
|
|||
publications {
|
||||
maven(MavenPublication) {
|
||||
groupId 'net.fabricmc'
|
||||
artifactId "pomf"
|
||||
version pomfVersion
|
||||
artifactId "yarn"
|
||||
version yarnVersion
|
||||
|
||||
artifact (compressTiny.fileOutput) {
|
||||
classifier "tiny"
|
||||
|
|
Loading…
Reference in New Issue