57 lines
1.3 KiB
Kotlin
57 lines
1.3 KiB
Kotlin
plugins {
|
|
java
|
|
}
|
|
|
|
group = "games.dmg"
|
|
version = providers.gradleProperty("releaseVersion")
|
|
.orElse("0.1.0-SNAPSHOT")
|
|
.get()
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror"))
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly("org.spigotmc:spigot-api:26.2-R0.1-SNAPSHOT")
|
|
compileOnly("net.dmulloy2:ProtocolLib:5.4.0")
|
|
|
|
testImplementation("org.spigotmc:spigot-api:26.2-R0.1-SNAPSHOT")
|
|
testImplementation("net.dmulloy2:ProtocolLib:5.4.0")
|
|
testImplementation(platform("org.junit:junit-bom:5.13.4"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
testImplementation("org.mockito:mockito-core:5.18.0")
|
|
testImplementation("org.yaml:snakeyaml:2.4")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
val pluginVersion = version
|
|
|
|
tasks.processResources {
|
|
filesMatching("plugin.yml") {
|
|
expand("version" to pluginVersion)
|
|
}
|
|
}
|
|
|
|
tasks.register<Exec>("validateOkf") {
|
|
commandLine("./scripts/validate-okf.sh")
|
|
}
|
|
|
|
tasks.check {
|
|
dependsOn("validateOkf")
|
|
}
|