diff --git a/README.md b/README.md index 5066b4c..59a5cb9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Note: ViaVersion is designed for Vanilla Minecraft servers. It probably will not | Dependency | Download | | --------------------------------- | ------------------------------------------------------------------- | -| ViaVersion 3.0.2+ | dev builds at https://ci.viaversion.com/job/ViaVersion/ | +| ViaVersion 3.0.2+ | https://ci.viaversion.com/job/ViaVersion/ | | Fabric Textures v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api | | Fabric Resource Loader v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api | | Fabric Command API v1 | https://www.curseforge.com/minecraft/mc-mods/fabric-api | @@ -28,15 +28,15 @@ Note: ViaVersion is designed for Vanilla Minecraft servers. It probably will not **1.8.9 Dependencies:** -| Dependency | Download | -| -------------------------- | ------------------------------------------------------- | -| ViaVersion 3.0.2+ | dev builds at https://ci.viaversion.com/job/ViaVersion/ | -| Fabric Commands v0 | unknown? (https://github.com/Legacy-Fabric/fabric) | -| Fabric Events Lifecycle v0 | unknown? (https://github.com/Legacy-Fabric/fabric) | -| Fabric Resource Loader v0 | unknown? (https://github.com/Legacy-Fabric/fabric) | +| Dependency | Download | +| -------------------------- | -------------------------------------------------------------- | +| ViaVersion 3.0.2+ | https://ci.viaversion.com/job/ViaVersion/ | +| Fabric Commands v0 | https://www.curseforge.com/minecraft/mc-mods/legacy-fabric-api | +| Fabric Events Lifecycle v0 | https://www.curseforge.com/minecraft/mc-mods/legacy-fabric-api | +| Fabric Resource Loader v0 | https://www.curseforge.com/minecraft/mc-mods/legacy-fabric-api | -With ViaVersion: +With [ViaVersion](https://viaversion.com): - your server can accept newer versions - your client can connect to older versions @@ -58,10 +58,10 @@ Adding [ViaBackwards](https://viaversion.com/backwards) (and optionally [ViaRewi | 1.15.2 | ✓ | ✓ | ✓ | ✓ | ⟲ | | 1.16.2 | ✓ | ✓ | ✓ | ✓ | ✓ | -✓ = ViaVersion ⟲ = ViaBackwards ⏪ = ViaRewind +✓ = [ViaVersion](https://viaversion.com) ⟲ = [ViaBackwards](https://viaversion.com/backwards) ⏪ = [ViaRewind](https://viaversion.com/rewind) -**Can ViaVersion and ViaBackwards support snapshots?:** -- Check https://ci.viaversion.com/job/ViaVersion-DEV/ and https://ci.viaversion.com/job/ViaBackwards-DEV/ for development builds with snapshot support +**Can ViaVersion, ViaBackwards and ViaRewind support snapshots?:** +- Check https://ci.viaversion.com/job/ViaVersion-DEV/, https://ci.viaversion.com/job/ViaBackwards-DEV/ and https://ci.viaversion.com/job/ViaRewind-DEV/ for development builds with snapshot support **Commands**: diff --git a/build.gradle.kts b/build.gradle.kts index b9478c9..1a9b8c1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,16 +5,23 @@ plugins { id("net.minecrell.licenser") version "0.4.1" id("fabric-loom") version "0.4-SNAPSHOT" id("com.palantir.git-version") version "0.12.0-rc2" + id("com.matthewprenger.cursegradle") version "1.4.0" } group = "com.github.creeper123123321.viafabric" val gitVersion: groovy.lang.Closure by extra val versionDetails: groovy.lang.Closure by extra -version = "0.2.5-SNAPSHOT+" + try { - val travisBranch: String? = System.getenv("TRAVIS_BRANCH") // version details doesn't work on travis - gitVersion() + "-" + if (travisBranch.isNullOrBlank()) versionDetails().branchName else travisBranch + +val travisBranch: String? = System.getenv("TRAVIS_BRANCH") // version details doesn't work on travis +val branch = if (!travisBranch.isNullOrBlank()) travisBranch else try { + versionDetails().branchName +} catch (e: Exception) { + "unknown" +} + +version = "0.2.5-SNAPSHOT+" + try { + gitVersion() + "-" + branch } catch (e: Exception) { - e.printStackTrace() "unknown" } extra.set("archivesBaseName", "ViaFabric") @@ -64,6 +71,45 @@ dependencies { include("io.github.cottonmc:cotton-client-commands:1.0.1+1.16-rc1") } +curseforge { + if (project.hasProperty("curse_api_key")) { + apiKey = project.properties["curse_api_key"] + } + project(closureOf { + id = "391298" + changelog = "A changelog can be found at https://github.com/ViaVersion/ViaFabric/commits" + releaseType = "alpha" + when (branch) { + "mc-1.8" -> addGameVersion("1.8.9") + "mc-1.14-1.15" -> { + addGameVersion("1.14.4") + addGameVersion("1.15.2") + } + "mc-1.16" -> { + addGameVersion("1.16.1") + } + } + addGameVersion("Fabric") + mainArtifact(file("${project.buildDir}/libs/${project.base.archivesBaseName}-${project.version}.jar"), closureOf { + relations(closureOf { + if (branch == "mc-1.8") { + requiredDependency("400281") // Legacy Fabric API + } else { + requiredDependency("306612") // Fabric API + embeddedLibrary("323986") // Cotton Client Commands + } + }) + displayName = "[$branch] ViaFabric ${project.version}" + }) + afterEvaluate { + uploadTask.dependsOn("remapJar") + } + }) + options(closureOf { + forgeGradleIntegration = false + }) +} + minecraft { }