2025-08-09 03:02:07 +03:00
|
|
|
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
|
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
kotlin("jvm") version "2.2.10-RC"
|
|
|
|
|
id("de.eldoria.plugin-yml.paper") version "0.7.1"
|
|
|
|
|
id("com.gradleup.shadow") version "9.0.0-rc1"
|
|
|
|
|
id("xyz.jpenilla.run-paper") version "2.3.1"
|
|
|
|
|
id("maven-publish")
|
|
|
|
|
kotlin("kapt") version "2.2.10-RC"
|
|
|
|
|
id("java")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val javaVersion = 24
|
|
|
|
|
|
|
|
|
|
group = "dev.marrow"
|
2025-08-09 07:39:59 +05:00
|
|
|
version = "1.1"
|
|
|
|
|
description = "listener of labels and maps"
|
2025-08-09 03:02:07 +03:00
|
|
|
|
|
|
|
|
// paper-plugin.yml
|
|
|
|
|
paper {
|
|
|
|
|
|
|
|
|
|
// name is rootProject.name
|
|
|
|
|
// description is description value
|
|
|
|
|
// version is version value
|
|
|
|
|
|
|
|
|
|
foliaSupported = true
|
2025-08-09 07:39:59 +05:00
|
|
|
author = "Lonewoss"
|
2025-08-09 03:02:07 +03:00
|
|
|
main = "$group.${project.name.lowercase()}.Core"
|
|
|
|
|
apiVersion = "1.21"
|
2025-08-09 07:39:59 +05:00
|
|
|
prefix = "ZSign"
|
2025-08-09 03:02:07 +03:00
|
|
|
|
|
|
|
|
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
|
|
|
|
|
|
|
|
|
permissions {
|
|
|
|
|
register("${project.name.lowercase()}.example") {
|
|
|
|
|
description = "allow use /example"
|
|
|
|
|
defaultPermission = BukkitPluginDescription.Permission.Default.OP
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
mavenLocal()
|
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
|
maven("https://libraries.minecraft.net")
|
|
|
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
|
|
|
|
maven("https://repo.codemc.io/repository/maven-snapshots/")
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-api:${project.property("mccoroutine_version")}")
|
|
|
|
|
implementation("com.github.shynixn.mccoroutine:mccoroutine-bukkit-core:${project.property("mccoroutine_version")}")
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${project.property("kotlinx_coroutines_version")}")
|
|
|
|
|
@Suppress("VulnerableLibrariesLocal", "RedundantSuppression")
|
|
|
|
|
compileOnly("io.papermc.paper:paper-api:${project.property("paper_api_version")}")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
|
publications.create("maven", MavenPublication::class) {
|
|
|
|
|
artifactId = project.name.lowercase()
|
|
|
|
|
groupId = "${project.group}"
|
|
|
|
|
version = "${project.version}"
|
|
|
|
|
from(components["kotlin"])
|
|
|
|
|
}
|
|
|
|
|
repositories {
|
|
|
|
|
maven {
|
|
|
|
|
name = "marrow"
|
|
|
|
|
url = uri("https://code.pgnco.dev/releases")
|
|
|
|
|
credentials {
|
|
|
|
|
username = System.getenv("username")
|
|
|
|
|
password = System.getenv("secret")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
|
|
|
|
|
|
runServer {
|
2025-08-09 07:39:59 +05:00
|
|
|
serverJar(file("run/prismatic-bundler-1.21.8-R0.1-SNAPSHOT-mojmap.jar"))
|
2025-08-09 03:02:07 +03:00
|
|
|
version("1.21.7")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build {
|
|
|
|
|
dependsOn(shadowJar)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
|
archiveClassifier.set("")
|
|
|
|
|
exclude("**/*.kotlin_metadata")
|
|
|
|
|
exclude("**/*.kotlin_builtins")
|
|
|
|
|
mergeServiceFiles()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileKotlin {
|
|
|
|
|
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(javaVersion.toString()))
|
|
|
|
|
compilerOptions.freeCompilerArgs.set(listOf("-opt-in=kotlin.io.path.ExperimentalPathApi"))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileJava {
|
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
|
options.release.set(javaVersion)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
javadoc {
|
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
|
|
|
}
|
|
|
|
|
}
|