mirror of https://github.com/FabricMC/yarn.git
Publish pomf to maven
This commit is contained in:
parent
d3eb0a76be
commit
e9ab5d3d5e
|
@ -7,7 +7,7 @@ node {
|
|||
|
||||
sh "rm -rf build/libs/"
|
||||
sh "chmod +x gradlew"
|
||||
sh "./gradlew build"
|
||||
sh "./gradlew build publish"
|
||||
|
||||
stage "Archive artifacts"
|
||||
|
||||
|
|
44
build.gradle
44
build.gradle
|
@ -16,6 +16,8 @@ buildscript {
|
|||
}
|
||||
|
||||
apply plugin: 'de.undercouch.download'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
def minecraft_version = "18w43c"
|
||||
def pomfVersion = "${minecraft_version}"
|
||||
|
@ -34,6 +36,7 @@ def versionFile = new File(cacheFilesMinecraft, "${minecraft_version}.json")
|
|||
def clientJar = new File(cacheFilesMinecraft, "${minecraft_version}-client.jar")
|
||||
def serverJar = new File(cacheFilesMinecraft, "${minecraft_version}-server.jar")
|
||||
def libraries = new File(cacheFilesMinecraft, "${minecraft_version}-libraries")
|
||||
def libs = new File("build/libs/")
|
||||
|
||||
import groovy.json.JsonSlurper
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
@ -197,7 +200,7 @@ task pomf(dependsOn: setupPomf) {
|
|||
}
|
||||
}
|
||||
|
||||
task build(type: Zip) {
|
||||
task buildEngima(type: Zip) {
|
||||
from mappingsDir
|
||||
include "**/*"
|
||||
archiveName "pomf-enigma-${pomfVersion}.zip"
|
||||
|
@ -218,14 +221,14 @@ task checkMappings {
|
|||
}
|
||||
}
|
||||
|
||||
task buildTiny(dependsOn: "mergeJars") {
|
||||
task buildTiny(dependsOn: "mergeJars", type: FileOutput) {
|
||||
inputs.dir mappingsDir
|
||||
def libs = new File("build/libs/")
|
||||
if (!libs.exists()) {
|
||||
libs.mkdirs()
|
||||
}
|
||||
def outputFile = new File(libs, "pomf-tiny-${pomfVersion}.gz")
|
||||
outputs.file(outputFile)
|
||||
fileOutput = outputFile
|
||||
doLast {
|
||||
logger.lifecycle(":generating tiny mappings")
|
||||
|
||||
|
@ -260,6 +263,7 @@ task buildTiny(dependsOn: "mergeJars") {
|
|||
}
|
||||
|
||||
tasks.build.dependsOn "buildTiny"
|
||||
tasks.build.dependsOn "buildEngima"
|
||||
|
||||
task downloadMcLibs(dependsOn: downloadWantedVersionManifest) {
|
||||
inputs.files versionFile
|
||||
|
@ -336,4 +340,38 @@ task mapJar(dependsOn: [downloadMcLibs, build]) {
|
|||
throw new RuntimeException("Failed to remap jar", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
groupId 'net.fabricmc'
|
||||
artifactId project.archivesBaseName
|
||||
version pomfVersion
|
||||
|
||||
artifact (buildTiny.fileOutput) {
|
||||
classifier "tiny"
|
||||
}
|
||||
artifact (buildEngima) {
|
||||
classifier "engima"
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "http://mavenupload.modmuss50.me/"
|
||||
if (project.hasProperty('mavenPass')) {
|
||||
credentials {
|
||||
username 'buildslave'
|
||||
password project.getProperty('mavenPass')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class FileOutput extends DefaultTask {
|
||||
@OutputFile File fileOutput
|
||||
}
|
Loading…
Reference in New Issue