/ build.gradle.kts
build.gradle.kts
 1  plugins {
 2      kotlin("jvm") version "2.3.20-Beta1"
 3      id("com.gradleup.shadow") version "8.3.0"
 4      id("xyz.jpenilla.run-paper") version "2.3.1"
 5  }
 6  
 7  group = "com.noximity"
 8  version = "1.0.0"
 9  
10  repositories {
11      mavenCentral()
12      maven("https://repo.papermc.io/repository/maven-public/") {
13          name = "papermc-repo"
14      }
15  }
16  
17  dependencies {
18      compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
19      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
20  }
21  
22  tasks {
23      runServer {
24          // Configure the Minecraft version for our task.
25          // This is the only required configuration besides applying the plugin.
26          // Your plugin's jar (or shadowJar if present) will be used automatically.
27          minecraftVersion("1.21")
28      }
29  }
30  
31  val targetJavaVersion = 21
32  kotlin {
33      jvmToolchain(targetJavaVersion)
34  }
35  
36  tasks.build {
37      dependsOn("shadowJar")
38  }
39  
40  tasks.processResources {
41      val props = mapOf("version" to version)
42      inputs.properties(props)
43      filteringCharset = "UTF-8"
44      filesMatching("paper-plugin.yml") {
45          expand(props)
46      }
47  }