Skip to content

Commit a06e592

Browse files
zml2008jpenilla
authored andcommitted
fix velocity build (#332)
1 parent 3683358 commit a06e592

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

build-logic/src/main/kotlin/Versions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ object Versions {
1919
const val adventureApi = "4.9.3"
2020
const val adventurePlatform = "4.0.1"
2121
const val paperApi = "1.16.5-R0.1-SNAPSHOT"
22-
const val velocityApi = "1.1.0"
22+
const val velocityApi = "3.1.0"
2323
const val spongeApi7 = "7.3.0"
2424
const val jetbrainsAnnotations = "23.0.0"
2525
const val guava = "21.0-jre"

cloud-minecraft/cloud-velocity/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
java {
2+
disableAutoTargetJvm()
3+
}
4+
15
dependencies {
26
api(projects.cloudCore)
37
api(projects.cloudBrigadier)

examples/example-velocity/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ plugins {
33
id("cloud.example-conventions")
44
}
55

6+
indra {
7+
javaVersions().target(11) // Velocity 3 requires Java 11
8+
}
9+
610
val velocityRunClasspath by configurations.creating {
711
attributes {
812
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME))
@@ -35,7 +39,9 @@ tasks {
3539
group = "cloud"
3640
description = "Spin up a Velocity server environment"
3741
standardInput = System.`in`
38-
javaLauncher.set(project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(11)) })
42+
if (JavaVersion.current() < JavaVersion.VERSION_11) {
43+
javaLauncher.set(project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(11)) })
44+
}
3945

4046
inputs.files(pluginJar)
4147

@@ -64,5 +70,5 @@ dependencies {
6470
api(project(":cloud-minecraft-extras"))
6571
api(project(":cloud-annotations"))
6672
annotationProcessor(compileOnly("com.velocitypowered", "velocity-api", Versions.velocityApi))
67-
velocityRunClasspath("com.velocitypowered", "velocity-proxy", "3.0.0")
73+
velocityRunClasspath("com.velocitypowered", "velocity-proxy", Versions.velocityApi)
6874
}

0 commit comments

Comments
 (0)