Initial commit
This commit is contained in:
commit
2b5a19c41b
15 changed files with 587 additions and 0 deletions
115
build.gradle.kts
Executable file
115
build.gradle.kts
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
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"
|
||||
version = "1.0"
|
||||
description = "paper plugin template"
|
||||
|
||||
// paper-plugin.yml
|
||||
paper {
|
||||
|
||||
// name is rootProject.name
|
||||
// description is description value
|
||||
// version is version value
|
||||
|
||||
foliaSupported = true
|
||||
author = "You"
|
||||
main = "$group.${project.name.lowercase()}.Core"
|
||||
apiVersion = "1.21"
|
||||
prefix = "example"
|
||||
|
||||
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 {
|
||||
//dependsOn(build)
|
||||
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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue