This commit is contained in:
creeper123123321 2021-11-26 19:02:09 -03:00
parent f2ee3bc413
commit 8f317b0318
2 changed files with 15 additions and 26 deletions

View File

@ -13,7 +13,7 @@ plugins {
} }
def ENV = System.getenv() def ENV = System.getenv()
def vvVer = "4.1.0-1.18-rc1-SNAPSHOT" def vvVer = "4.1.0-1.18-rc3-SNAPSHOT"
def yamlVer = "1.29" def yamlVer = "1.29"
description = "Client-side and server-side ViaVersion implementation for Fabric" description = "Client-side and server-side ViaVersion implementation for Fabric"
@ -46,10 +46,6 @@ allprojects {
group = "com.viaversion.fabric" group = "com.viaversion.fabric"
version = rootProject.version version = rootProject.version
configurations {
dev
}
repositories { repositories {
mavenCentral() mavenCentral()
maven { url = "https://repo.viaversion.com/" } maven { url = "https://repo.viaversion.com/" }
@ -67,21 +63,6 @@ allprojects {
modImplementation("net.fabricmc:fabric-loader:0.12.5") modImplementation("net.fabricmc:fabric-loader:0.12.5")
} }
jar {
archiveClassifier.set("dev")
}
afterEvaluate {
remapJar {
input.set(file("${project.buildDir}/libs/$archivesBaseName-${archiveVersion.get()}-dev.jar"))
archiveFileName = "${archivesBaseName}-${archiveVersion.get()}.jar"
}
artifacts {
dev file: file("${project.buildDir}/libs/$archivesBaseName-${version}-dev.jar"), type: "jar", builtBy: jar
}
}
processResources { processResources {
filesMatching("fabric.mod.json") { filesMatching("fabric.mod.json") {
filter(ReplaceTokens, tokens: [ filter(ReplaceTokens, tokens: [
@ -123,19 +104,27 @@ subprojects {
task remapMavenJar(type: RemapJarTask, dependsOn: jar) { task remapMavenJar(type: RemapJarTask, dependsOn: jar) {
afterEvaluate { afterEvaluate {
input.set(file("${project.buildDir}/libs/${archivesBaseName}-${version}-dev.jar")) input = jar.archiveFile
archiveFileName = "${archivesBaseName}-${version}-maven.jar" archiveFileName = "${archivesBaseName}-${version}-maven.jar"
addNestedDependencies.set(false) addNestedDependencies.set(false)
} }
} }
build.dependsOn remapMavenJar
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java artifact(remapMavenJar) {
builtBy remapMavenJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
pom.withXml { pom.withXml {
def depsNode = asNode {}.appendNode("dependencies") def depsNode = asNode().appendNode("dependencies")
subprojects.each { subprojects.each {
def depNode = depsNode.appendNode("dependency") def depNode = depsNode.appendNode("dependency")
depNode.appendNode("groupId", it.group) depNode.appendNode("groupId", it.group)
@ -194,7 +183,7 @@ curseforge {
"Java 8", "Java 9", "Java 10", "Java 11", "Java 12", "Java 13", "Java 14", "Java 15", "Java 16", "Java 17", "Fabric") "Java 8", "Java 9", "Java 10", "Java 11", "Java 12", "Java 13", "Java 14", "Java 15", "Java 16", "Java 17", "Fabric")
.forEach { ver -> addGameVersion(ver) } .forEach { ver -> addGameVersion(ver) }
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) { mainArtifact(remapJar) {
displayName = "[${getBranch()}] ViaFabric " + rootProject.version displayName = "[${getBranch()}] ViaFabric " + rootProject.version
relations { relations {
optionalDependency("fabric-api") optionalDependency("fabric-api")

View File

@ -1,6 +1,6 @@
dependencies { dependencies {
minecraft("com.mojang:minecraft:1.18-rc1") minecraft("com.mojang:minecraft:1.18-rc3")
mappings("net.fabricmc:yarn:1.18-rc1+build.1:v2") mappings("net.fabricmc:yarn:1.18-rc3+build.1:v2")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.43.1+1.18") modImplementation("net.fabricmc.fabric-api:fabric-api:0.43.1+1.18")
modImplementation("com.terraformersmc:modmenu:3.0.0") modImplementation("com.terraformersmc:modmenu:3.0.0")