fix velocity build (#332)
This commit is contained in:
parent
36833588d3
commit
a06e592d4a
3 changed files with 13 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ object Versions {
|
||||||
const val adventureApi = "4.9.3"
|
const val adventureApi = "4.9.3"
|
||||||
const val adventurePlatform = "4.0.1"
|
const val adventurePlatform = "4.0.1"
|
||||||
const val paperApi = "1.16.5-R0.1-SNAPSHOT"
|
const val paperApi = "1.16.5-R0.1-SNAPSHOT"
|
||||||
const val velocityApi = "1.1.0"
|
const val velocityApi = "3.1.0"
|
||||||
const val spongeApi7 = "7.3.0"
|
const val spongeApi7 = "7.3.0"
|
||||||
const val jetbrainsAnnotations = "23.0.0"
|
const val jetbrainsAnnotations = "23.0.0"
|
||||||
const val guava = "21.0-jre"
|
const val guava = "21.0-jre"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
java {
|
||||||
|
disableAutoTargetJvm()
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.cloudCore)
|
api(projects.cloudCore)
|
||||||
api(projects.cloudBrigadier)
|
api(projects.cloudBrigadier)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ plugins {
|
||||||
id("cloud.example-conventions")
|
id("cloud.example-conventions")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indra {
|
||||||
|
javaVersions().target(11) // Velocity 3 requires Java 11
|
||||||
|
}
|
||||||
|
|
||||||
val velocityRunClasspath by configurations.creating {
|
val velocityRunClasspath by configurations.creating {
|
||||||
attributes {
|
attributes {
|
||||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME))
|
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME))
|
||||||
|
|
@ -35,7 +39,9 @@ tasks {
|
||||||
group = "cloud"
|
group = "cloud"
|
||||||
description = "Spin up a Velocity server environment"
|
description = "Spin up a Velocity server environment"
|
||||||
standardInput = System.`in`
|
standardInput = System.`in`
|
||||||
javaLauncher.set(project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(11)) })
|
if (JavaVersion.current() < JavaVersion.VERSION_11) {
|
||||||
|
javaLauncher.set(project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(11)) })
|
||||||
|
}
|
||||||
|
|
||||||
inputs.files(pluginJar)
|
inputs.files(pluginJar)
|
||||||
|
|
||||||
|
|
@ -64,5 +70,5 @@ dependencies {
|
||||||
api(project(":cloud-minecraft-extras"))
|
api(project(":cloud-minecraft-extras"))
|
||||||
api(project(":cloud-annotations"))
|
api(project(":cloud-annotations"))
|
||||||
annotationProcessor(compileOnly("com.velocitypowered", "velocity-api", Versions.velocityApi))
|
annotationProcessor(compileOnly("com.velocitypowered", "velocity-api", Versions.velocityApi))
|
||||||
velocityRunClasspath("com.velocitypowered", "velocity-proxy", "3.0.0")
|
velocityRunClasspath("com.velocitypowered", "velocity-proxy", Versions.velocityApi)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue