BREAKING CHANGE: New releases require Java 25/Purpur 26.2 and use purpur-event-producer-<version>.jar. Runtime SpigotEventProducer identity, server UUID, SQLite outbox and CloudEvent delivery contracts remain unchanged. Replace the old JAR rather than installing both distributions.
58 lines
1.4 KiB
Kotlin
58 lines
1.4 KiB
Kotlin
plugins {
|
|
java
|
|
}
|
|
|
|
group = "games.dmg"
|
|
version = providers.gradleProperty("releaseVersion")
|
|
.orElse("0.1.0-SNAPSHOT")
|
|
.get()
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.purpurmc.org/snapshots/")
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.compilerArgs.add("-Xlint:deprecation")
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly("org.purpurmc.purpur:purpur-api:26.2.build.2618-stable")
|
|
implementation("org.xerial:sqlite-jdbc:3.50.3.0")
|
|
|
|
testImplementation("org.purpurmc.purpur:purpur-api:26.2.build.2618-stable")
|
|
testImplementation(platform("org.junit:junit-bom:5.13.4"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
dependsOn(tasks.jar)
|
|
systemProperty("distribution.jar", tasks.jar.get().archiveFile.get().asFile.absolutePath)
|
|
systemProperty("distribution.version", project.version.toString())
|
|
}
|
|
|
|
val pluginVersion = version
|
|
|
|
tasks.processResources {
|
|
filesMatching("plugin.yml") {
|
|
expand("version" to pluginVersion)
|
|
}
|
|
}
|
|
|
|
tasks.jar {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest {
|
|
attributes["Multi-Release"] = "true"
|
|
}
|
|
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
|
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA")
|
|
}
|