From 2a4fff8ac9ba30460710fafee3ed40bbff857d6c Mon Sep 17 00:00:00 2001 From: jmp Date: Wed, 17 Feb 2021 21:32:43 -0800 Subject: [PATCH] Switch to indra, attempt to fix shading and universal jar --- build.gradle.kts | 166 ++++++------------ buildSrc/build.gradle.kts | 7 +- buildSrc/src/main/kotlin/Versions.kt | 31 ++++ buildSrc/src/main/kotlin/extensions.kt | 114 ++++++++---- buildSrc/src/main/kotlin/relocator.gradle.kts | 0 bukkit-legacy/build.gradle.kts | 6 +- bukkit/build.gradle.kts | 8 +- bungee/build.gradle.kts | 6 +- common/build.gradle.kts | 31 ++-- fabric/build.gradle.kts | 4 +- gradlew | 0 jar/build.gradle.kts | 18 -- settings.gradle.kts | 37 ++-- sponge-legacy/build.gradle.kts | 6 +- sponge/build.gradle.kts | 6 +- universal/build.gradle.kts | 23 +++ velocity/build.gradle.kts | 8 +- 17 files changed, 226 insertions(+), 245 deletions(-) create mode 100644 buildSrc/src/main/kotlin/Versions.kt delete mode 100644 buildSrc/src/main/kotlin/relocator.gradle.kts mode change 100644 => 100755 gradlew delete mode 100644 jar/build.gradle.kts create mode 100644 universal/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index 78e7463a1..19b478eef 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,142 +1,74 @@ -import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import net.kyori.indra.IndraPlugin +import net.kyori.indra.IndraPublishingPlugin +import net.kyori.indra.sonatypeSnapshots plugins { `java-library` - `maven-publish` - id("com.github.johnrengelman.shadow") version ("6.1.0") apply false + id("net.kyori.indra") } +group = "us.myles" +version = "3.3.0-21w06a" +description = "Allow newer clients to join older server versions." + subprojects { - apply { - plugin() - plugin() - plugin() - plugin() - } - - group = "us.myles" - version = "3.3.0-21w06a" - description = "Allow newer clients to join older server versions." - - java.sourceCompatibility = JavaVersion.VERSION_1_8 + apply() + apply() + apply() + apply() tasks { - build { - dependsOn(withType()) - } - - test { - useJUnitPlatform() - } - - withType() { - options.encoding = "UTF-8" - } - javadoc { - options.encoding = "UTF-8" - } - // Variable replacements processResources { filesMatching(listOf("plugin.yml", "mcmod.info", "fabric.mod.json", "bungee.yml")) { expand("version" to project.version, "description" to project.description) } } + } - withType() { - archiveFileName.set("ViaVersion-" + project.version + ".jar") - - relocate("org.yaml.snakeyaml", "us.myles.viaversion.libs.snakeyaml") - relocate("javassist", "us.myles.viaversion.libs.javassist") - relocate("com.google.gson", "us.myles.viaversion.libs.gson") - relocate("com.github.steveice10.opennbt", "us.myles.viaversion.libs.opennbt") - - relocate("net.md_5.bungee", "us.myles.viaversion.libs.bungeecordchat") { - include("net.md_5.bungee.api.chat.*") - include("net.md_5.bungee.api.ChatColor") - include("net.md_5.bungee.api.ChatMessageType") - include("net.md_5.bungee.chat.*") - } - - relocate("it.unimi.dsi.fastutil", "us.myles.viaversion.libs.fastutil") { - // We only want int and Object maps - include("it.unimi.dsi.fastutil.ints.*") - include("it.unimi.dsi.fastutil.objects.*") - include("it.unimi.dsi.fastutil.*.class") - // Object types - exclude("it.unimi.dsi.fastutil.*.*Reference*") - exclude("it.unimi.dsi.fastutil.*.*Boolean*") - exclude("it.unimi.dsi.fastutil.*.*Byte*") - exclude("it.unimi.dsi.fastutil.*.*Short*") - exclude("it.unimi.dsi.fastutil.*.*Float*") - exclude("it.unimi.dsi.fastutil.*.*Double*") - exclude("it.unimi.dsi.fastutil.*.*Long*") - exclude("it.unimi.dsi.fastutil.*.*Char*") - // Map types - exclude("it.unimi.dsi.fastutil.*.*Custom*") - exclude("it.unimi.dsi.fastutil.*.*Linked*") - exclude("it.unimi.dsi.fastutil.*.*Sorted*") - exclude("it.unimi.dsi.fastutil.*.*Tree*") - exclude("it.unimi.dsi.fastutil.*.*Heap*") - exclude("it.unimi.dsi.fastutil.*.*Queue*") - // Crossing fingers - exclude("it.unimi.dsi.fastutil.*.*Big*") - exclude("it.unimi.dsi.fastutil.*.*Synchronized*") - exclude("it.unimi.dsi.fastutil.*.*Unmodifiable*") - } - } + val platforms = listOf( + "bukkit", + "bungee", + "fabric", + "sponge", + "velocity" + ).map { "viaversion-$it" } + if (platforms.contains(project.name)) { + configureShadowJar() } repositories { - maven { - url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots") - } - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots") - } - maven { - url = uri("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/") - } - maven { - url = uri("https://repo.spongepowered.org/maven") - } - maven { - url = uri("https://repo.viaversion.com") - } - maven { - url = uri("https://libraries.minecraft.net") - } - maven { - url = uri("https://repo.maven.apache.org/maven2/") - } + sonatypeSnapshots() + maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") + maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/") + maven("https://repo.spongepowered.org/maven") + maven("https://repo.viaversion.com") + maven("https://libraries.minecraft.net") + maven("https://repo.maven.apache.org/maven2/") } dependencies { - implementation("net.md-5:bungeecord-chat:1.16-R0.5-SNAPSHOT") - implementation("it.unimi.dsi:fastutil:8.3.1") - implementation("com.github.steveice10:opennbt:1.2-SNAPSHOT") - implementation("com.google.code.gson:gson:2.8.6") - implementation("org.javassist:javassist:3.27.0-GA") - implementation("org.yaml:snakeyaml:1.18") - - compileOnly("io.netty:netty-all:4.0.20.Final") - compileOnly("com.google.guava:guava:17.0") - compileOnly("org.jetbrains:annotations:19.0.0") - - testImplementation("io.netty:netty-all:4.0.20.Final") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.3") - testImplementation("org.junit.jupiter:junit-jupiter-engine:5.6.3") + testImplementation("io.netty", "netty-all", Versions.netty) + testImplementation("com.google.guava", "guava", Versions.guava) + testImplementation("org.junit.jupiter", "junit-jupiter-api", Versions.jUnit) + testImplementation("org.junit.jupiter", "junit-jupiter-engine", Versions.jUnit) } - java { - withSourcesJar() - withJavadocJar() - } - - publishing { - publications.create("maven") { - from(components["java"]) + indra { + javaVersions { + target.set(8) + testWith(8, 11, 15) } + github("ViaVersion", "ViaVersion") { + issues = true + } + mitLicense() } -} \ No newline at end of file +} + +tasks { + // root project has no useful artifacts + withType { + onlyIf { false } + } +} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 2fda01c25..3b0f9bc24 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,14 +1,13 @@ plugins { - // Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. `kotlin-dsl` - id("com.github.johnrengelman.shadow") version ("6.1.0") apply false } repositories { - // Use the plugin portal to apply community plugins in convention plugins. gradlePluginPortal() } dependencies { - compileOnly("com.github.jengelman.gradle.plugins", "shadow", "6.1.0") + implementation("net.kyori", "indra-common", "1.3.1") + implementation("net.kyori", "indra-publishing-gradle-plugin", "1.3.1") + implementation("com.github.jengelman.gradle.plugins", "shadow", "6.1.0") } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt new file mode 100644 index 000000000..fc34eb941 --- /dev/null +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -0,0 +1,31 @@ +object Versions { + // common + const val netty = "4.0.20.Final" + const val guava = "17.0" + const val jUnit = "5.6.3" + const val bungeeChat = "1.16-R0.5-SNAPSHOT" + const val fastUtil = "8.3.1" + const val openNBT = "1.2-SNAPSHOT" + const val gson = "2.8.6" + const val javassist = "3.27.0-GA" + const val snakeYaml = "1.18" + const val jetbrainsAnnotations = "19.0.0" + + // bukkit + const val spigot = "1.16.5-R0.1-SNAPSHOT" + + // bukkit-legacy + const val legacyBukkit = "1.8.8-R0.1-SNAPSHOT" + + // bungee + const val bungee = "1.15-SNAPSHOT" + + // sponge + const val sponge = "5.0.0-SNAPSHOT" + + // sponge-legacy + const val legacySponge = "4.0.0-SNAPSHOT" + + // velocity + const val velocityApi = "1.1.0-SNAPSHOT" +} diff --git a/buildSrc/src/main/kotlin/extensions.kt b/buildSrc/src/main/kotlin/extensions.kt index cfe7f63b0..1d326a63c 100644 --- a/buildSrc/src/main/kotlin/extensions.kt +++ b/buildSrc/src/main/kotlin/extensions.kt @@ -1,45 +1,81 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.invoke +import org.gradle.kotlin.dsl.withType +import java.io.ByteArrayOutputStream -fun relocate(shadow: ShadowJar) { - shadow.relocate("org.yaml.snakeyaml", "us.myles.viaversion.libs.snakeyaml") - shadow.relocate("javassist", "us.myles.viaversion.libs.javassist") - shadow.relocate("com.google.gson", "us.myles.viaversion.libs.gson") - shadow.relocate("com.github.steveice10.opennbt", "us.myles.viaversion.libs.opennbt") - - shadow.relocate("net.md_5.bungee", "us.myles.viaversion.libs.bungeecordchat") { - include("net.md_5.bungee.api.chat.*") - include("net.md_5.bungee.api.ChatColor") - include("net.md_5.bungee.api.ChatMessageType") - include("net.md_5.bungee.chat.*") +fun Project.configureShadowJar() { + apply() + tasks { + withType { + archiveClassifier.set("") + destinationDirectory.set(rootProject.projectDir.resolve("build/libs")) + //minimize() // ? + configureRelocations() + configureExcludes() + } + getByName("build") { + dependsOn(withType()) + } } } -fun relocateAll(shadow: ShadowJar) { - relocate(shadow) - shadow.relocate("it.unimi.dsi.fastutil", "us.myles.viaversion.libs.fastutil") { - // We only want int and Object maps - include("it.unimi.dsi.fastutil.ints.*") - include("it.unimi.dsi.fastutil.objects.*") - include("it.unimi.dsi.fastutil.*.class") - // Object types - exclude("it.unimi.dsi.fastutil.*.*Reference*") - exclude("it.unimi.dsi.fastutil.*.*Boolean*") - exclude("it.unimi.dsi.fastutil.*.*Byte*") - exclude("it.unimi.dsi.fastutil.*.*Short*") - exclude("it.unimi.dsi.fastutil.*.*Float*") - exclude("it.unimi.dsi.fastutil.*.*Double*") - exclude("it.unimi.dsi.fastutil.*.*Long*") - exclude("it.unimi.dsi.fastutil.*.*Char*") - // Map types - exclude("it.unimi.dsi.fastutil.*.*Custom*") - exclude("it.unimi.dsi.fastutil.*.*Linked*") - exclude("it.unimi.dsi.fastutil.*.*Sorted*") - exclude("it.unimi.dsi.fastutil.*.*Tree*") - exclude("it.unimi.dsi.fastutil.*.*Heap*") - exclude("it.unimi.dsi.fastutil.*.*Queue*") - // Crossing fingers - exclude("it.unimi.dsi.fastutil.*.*Big*") - exclude("it.unimi.dsi.fastutil.*.*Synchronized*") - exclude("it.unimi.dsi.fastutil.*.*Unmodifiable*") - } +private fun ShadowJar.configureRelocations() { + relocate("org.yaml.snakeyaml", "us.myles.viaversion.libs.snakeyaml") + relocate("javassist", "us.myles.viaversion.libs.javassist") + relocate("com.google.gson", "us.myles.viaversion.libs.gson") + relocate("com.github.steveice10.opennbt", "us.myles.viaversion.libs.opennbt") + relocate("net.md_5.bungee", "us.myles.viaversion.libs.bungeecordchat") + relocate("it.unimi.dsi.fastutil", "us.myles.viaversion.libs.fastutil") +} + +private fun ShadowJar.configureExcludes() { + // bungee api + /* + include("net.md_5.bungee.api.chat.*") + include("net.md_5.bungee.api.ChatColor") + include("net.md_5.bungee.api.ChatMessageType") + include("net.md_5.bungee.chat.*") + */ + + // fastutil + + // We only want int and Object maps + /* + include("it.unimi.dsi.fastutil.ints.*") + include("it.unimi.dsi.fastutil.objects.*") + include("it.unimi.dsi.fastutil.*.class") + */ + + // Object types + exclude("it/unimi/dsi/fastutil/*/*Reference*") + exclude("it/unimi/dsi/fastutil/*/*Boolean*") + exclude("it/unimi/dsi/fastutil/*/*Byte*") + exclude("it/unimi/dsi/fastutil/*/*Short*") + exclude("it/unimi/dsi/fastutil/*/*Float*") + exclude("it/unimi/dsi/fastutil/*/*Double*") + exclude("it/unimi/dsi/fastutil/*/*Long*") + exclude("it/unimi/dsi/fastutil/*/*Char*") + // Map types + exclude("it/unimi/dsi/fastutil/*/*Custom*") + exclude("it/unimi/dsi/fastutil/*/*Linked*") + exclude("it/unimi/dsi/fastutil/*/*Sorted*") + exclude("it/unimi/dsi/fastutil/*/*Tree*") + exclude("it/unimi/dsi/fastutil/*/*Heap*") + exclude("it/unimi/dsi/fastutil/*/*Queue*") + // Crossing fingers + exclude("it/unimi/dsi/fastutil/*/*Big*") + exclude("it/unimi/dsi/fastutil/*/*Synchronized*") + exclude("it/unimi/dsi/fastutil/*/*Unmodifiable*") +} + +fun Project.latestCommitHash(): String { + val byteOut = ByteArrayOutputStream() + exec { + commandLine = listOf("git", "rev-parse", "--short", "HEAD") + standardOutput = byteOut + } + return byteOut.toString(Charsets.UTF_8.name()).trim() } diff --git a/buildSrc/src/main/kotlin/relocator.gradle.kts b/buildSrc/src/main/kotlin/relocator.gradle.kts deleted file mode 100644 index e69de29bb..000000000 diff --git a/bukkit-legacy/build.gradle.kts b/bukkit-legacy/build.gradle.kts index 6e3199500..02ec02b02 100644 --- a/bukkit-legacy/build.gradle.kts +++ b/bukkit-legacy/build.gradle.kts @@ -1,10 +1,8 @@ dependencies { - compileOnly(project(":viaversion-common")) - compileOnly("org.bukkit:bukkit:1.8.8-R0.1-SNAPSHOT") { + implementation(project(":viaversion-common")) + compileOnly("org.bukkit", "bukkit", Versions.legacyBukkit) { exclude("junit", "junit") exclude("com.google.code.gson", "gson") exclude("javax.persistence", "persistence-api") } } - -description = "viaversion-bukkit-legacy" diff --git a/bukkit/build.gradle.kts b/bukkit/build.gradle.kts index 9eb59e641..c9fa8c413 100644 --- a/bukkit/build.gradle.kts +++ b/bukkit/build.gradle.kts @@ -1,13 +1,9 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - dependencies { implementation(project(":viaversion-bukkit-legacy")) - compileOnly(project(":viaversion-common")) - compileOnly("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT") { + implementation(project(":viaversion-common")) + compileOnly("org.spigotmc", "spigot-api", Versions.spigot) { exclude("junit", "junit") exclude("com.google.code.gson", "gson") exclude("javax.persistence", "persistence-api") } } - -description = "viaversion-bukkit" diff --git a/bungee/build.gradle.kts b/bungee/build.gradle.kts index 387f235ba..fbc99a78d 100644 --- a/bungee/build.gradle.kts +++ b/bungee/build.gradle.kts @@ -1,6 +1,4 @@ dependencies { - compileOnly(project(":viaversion-common")) - compileOnly("net.md-5:bungeecord-api:1.15-SNAPSHOT") + implementation(project(":viaversion-common")) + compileOnly("net.md-5", "bungeecord-api", Versions.bungee) } - -description = "viaversion-bungee" diff --git a/common/build.gradle.kts b/common/build.gradle.kts index dd1d62039..123cb96fc 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,30 +1,23 @@ plugins { id("net.kyori.blossom") version "1.1.0" - id("org.ajoberstar.grgit") version "4.1.0" } -val commitId: String = grgit.head().abbreviatedId - blossom { replaceToken("\$VERSION", project.version) - replaceToken("\$IMPL_VERSION", "git-ViaVersion-" + project.version + ":" + commitId) + replaceToken("\$IMPL_VERSION", "git-ViaVersion-${project.version}:${rootProject.latestCommitHash()}") } dependencies { - implementation("net.md-5:bungeecord-chat:1.16-R0.5-SNAPSHOT") - implementation("it.unimi.dsi:fastutil:8.3.1") - implementation("com.github.steveice10:opennbt:1.2-SNAPSHOT") - implementation("com.google.code.gson:gson:2.8.6") - implementation("org.javassist:javassist:3.27.0-GA") - implementation("org.yaml:snakeyaml:1.18") + api("net.md-5", "bungeecord-chat", Versions.bungeeChat) { + exclude("com.google.guava") + } + api("it.unimi.dsi", "fastutil", Versions.fastUtil) + api("com.github.steveice10", "opennbt", Versions.openNBT) + api("com.google.code.gson", "gson", Versions.gson) + api("org.javassist", "javassist", Versions.javassist) + api("org.yaml", "snakeyaml", Versions.snakeYaml) - compileOnly("io.netty:netty-all:4.0.20.Final") - compileOnly("com.google.guava:guava:17.0") - compileOnly("org.jetbrains:annotations:19.0.0") - - testImplementation("io.netty:netty-all:4.0.20.Final") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.3") - testImplementation("org.junit.jupiter:junit-jupiter-engine:5.6.3") + compileOnlyApi("io.netty", "netty-all", Versions.netty) + compileOnlyApi("com.google.guava", "guava", Versions.guava) + compileOnlyApi("org.jetbrains", "annotations", Versions.jetbrainsAnnotations) } - -description = "viaversion-common" diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index c52771198..416fc0244 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -1,5 +1,3 @@ dependencies { - compileOnly(project(":viaversion-common")) + implementation(project(":viaversion-common")) } - -description = "viaversion-fabric" diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/jar/build.gradle.kts b/jar/build.gradle.kts deleted file mode 100644 index bcb1948c0..000000000 --- a/jar/build.gradle.kts +++ /dev/null @@ -1,18 +0,0 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - -dependencies { - implementation(project(":viaversion-common")) - implementation(project(":viaversion-bukkit")) - implementation(project(":viaversion-bungee")) - implementation(project(":viaversion-fabric")) - implementation(project(":viaversion-sponge")) - implementation(project(":viaversion-velocity")) -} - -tasks { - withType() { - archiveFileName.set("ViaVersion-" + project.version + ".jar") - } -} - -description = "viaversion-jar" diff --git a/settings.gradle.kts b/settings.gradle.kts index 0819d6229..b7bbb3a32 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,21 +1,22 @@ rootProject.name = "viaversion-parent" -include(":viaversion") -include(":viaversion-common") -include(":viaversion-bukkit") -include(":viaversion-bukkit-legacy") -include(":viaversion-bungee") -include(":viaversion-velocity") -include(":viaversion-sponge-legacy") -include(":viaversion-sponge") -include(":viaversion-fabric") +setupViaSubproject("common") +setupViaSubproject("bukkit") +setupViaSubproject("bukkit-legacy") +setupViaSubproject("bungee") +setupViaSubproject("velocity") +setupViaSubproject("sponge") +setupViaSubproject("sponge-legacy") +setupViaSubproject("fabric") +setupViaSubproject("universal") -project(":viaversion-common").projectDir = file("common") -project(":viaversion-bukkit").projectDir = file("bukkit") -project(":viaversion-bukkit-legacy").projectDir = file("bukkit-legacy") -project(":viaversion-bungee").projectDir = file("bungee") -project(":viaversion-velocity").projectDir = file("velocity") -project(":viaversion-sponge").projectDir = file("sponge") -project(":viaversion-sponge-legacy").projectDir = file("sponge-legacy") -project(":viaversion-fabric").projectDir = file("fabric") -project(":viaversion").projectDir = file("jar") +fun setupViaSubproject(name: String) { + setupSubproject("viaversion-$name") { + projectDir = file(name) + } +} + +inline fun setupSubproject(name: String, block: ProjectDescriptor.() -> Unit) { + include(name) + project(":$name").apply(block) +} diff --git a/sponge-legacy/build.gradle.kts b/sponge-legacy/build.gradle.kts index 3b3023056..14f58dd81 100644 --- a/sponge-legacy/build.gradle.kts +++ b/sponge-legacy/build.gradle.kts @@ -1,6 +1,4 @@ dependencies { - compileOnly(project(":viaversion-common")) - compileOnly("org.spongepowered:spongeapi:4.0.0-SNAPSHOT") + implementation(project(":viaversion-common")) + compileOnly("org.spongepowered", "spongeapi", Versions.legacySponge) } - -description = "viaversion-sponge-legacy" \ No newline at end of file diff --git a/sponge/build.gradle.kts b/sponge/build.gradle.kts index 7f31ac37c..9af9dbfd2 100644 --- a/sponge/build.gradle.kts +++ b/sponge/build.gradle.kts @@ -1,7 +1,5 @@ dependencies { implementation(project(":viaversion-sponge-legacy")) - compileOnly(project(":viaversion-common")) - compileOnly("org.spongepowered:spongeapi:5.0.0-SNAPSHOT") + implementation(project(":viaversion-common")) + compileOnly("org.spongepowered","spongeapi", Versions.sponge) } - -description = "viaversion-sponge" diff --git a/universal/build.gradle.kts b/universal/build.gradle.kts new file mode 100644 index 000000000..f68a23416 --- /dev/null +++ b/universal/build.gradle.kts @@ -0,0 +1,23 @@ +tasks { + val universalJar = register("universalJar") { + artifacts.add("archives", this) + archiveClassifier.set("") + destinationDirectory.set(rootProject.projectDir.resolve("build/libs")) + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + arrayOf( + "bukkit", + "bungee", + "fabric", + "sponge", + "velocity" + ).forEach { + val subProject = rootProject.project(":viaversion-$it") + val shadowJarTask = subProject.tasks.getByName("shadowJar") + from(zipTree(shadowJarTask.outputs.files.singleFile)) + dependsOn(shadowJarTask) + } + } + build { + dependsOn(universalJar) + } +} diff --git a/velocity/build.gradle.kts b/velocity/build.gradle.kts index eca0491e9..a5e04722b 100644 --- a/velocity/build.gradle.kts +++ b/velocity/build.gradle.kts @@ -1,7 +1,5 @@ dependencies { - compileOnly(project(":viaversion-common")) - compileOnly("com.velocitypowered:velocity-api:1.1.0-SNAPSHOT") - annotationProcessor("com.velocitypowered:velocity-api:1.1.0-SNAPSHOT") + implementation(project(":viaversion-common")) + compileOnly("com.velocitypowered", "velocity-api", Versions.velocityApi) + annotationProcessor("com.velocitypowered", "velocity-api", Versions.velocityApi) } - -description = "viaversion-velocity"