Convert Velocity buildscripts to Kotlin DSL (#918)
Spiritually indebted to #518 and @alexstaeding. There's a minor break - we're going up to 3.2.0-SNAPSHOT as the API now compiles against Java 11. But this is more academic in practice.
This commit is contained in:
47
build.gradle.kts
Normal file
47
build.gradle.kts
Normal file
@@ -0,0 +1,47 @@
|
||||
import com.velocitypowered.script.VelocityCheckstylePlugin
|
||||
import com.velocitypowered.script.VelocityPublishPlugin
|
||||
import org.cadixdev.gradle.licenser.Licenser
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
id("org.cadixdev.licenser") version "0.6.1"
|
||||
}
|
||||
|
||||
val junitVersion: String by project.extra
|
||||
|
||||
subprojects {
|
||||
group = "com.velocitypowered"
|
||||
version = "3.2.0-SNAPSHOT"
|
||||
|
||||
apply<JavaLibraryPlugin>()
|
||||
apply<Licenser>()
|
||||
|
||||
apply<VelocityCheckstylePlugin>()
|
||||
apply<VelocityPublishPlugin>()
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(11))
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
// kyoripowered
|
||||
maven("https://oss.sonatype.org/content/groups/public/")
|
||||
// velocity
|
||||
maven("https://nexus.velocitypowered.com/repository/maven-public/")
|
||||
}
|
||||
dependencies {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
|
||||
}
|
||||
|
||||
tasks {
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
reports {
|
||||
junitXml.required.set(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user