Initial commit
This commit is contained in:
commit
5c08a977dd
15 changed files with 590 additions and 0 deletions
104
build.gradle.kts
Executable file
104
build.gradle.kts
Executable file
|
|
@ -0,0 +1,104 @@
|
|||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.2.10"
|
||||
id("de.eldoria.plugin-yml.paper") version "0.7.1"
|
||||
id("com.gradleup.shadow") version "9.0.2"
|
||||
id("xyz.jpenilla.run-paper") version "2.3.1"
|
||||
id("maven-publish")
|
||||
kotlin("kapt") version "2.2.10"
|
||||
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 = project.name.lowercase()
|
||||
|
||||
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
||||
}
|
||||
|
||||
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 {
|
||||
@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 {
|
||||
version("1.21.8")
|
||||
}
|
||||
|
||||
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