| 1 | plugins { |
| 2 | java |
| 3 | } |
| 4 | |
| 5 | group = "nl.timfalken" |
| 6 | version = "1.1.0" |
| 7 | |
| 8 | repositories { |
| 9 | mavenCentral() |
| 10 | maven { |
| 11 | name = "papermc" |
| 12 | url = uri("https://repo.papermc.io/repository/maven-public/") |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | dependencies { |
| 17 | compileOnly("io.papermc.paper:paper-api:26.2.build.112-stable") |
| 18 | testImplementation("io.papermc.paper:paper-api:26.2.build.112-stable") |
| 19 | testImplementation("org.junit.jupiter:junit-jupiter:5.11.4") |
| 20 | testImplementation("org.yaml:snakeyaml:2.4") |
| 21 | testRuntimeOnly("org.junit.platform:junit-platform-launcher") |
| 22 | |
| 23 | } |
| 24 | |
| 25 | java { |
| 26 | toolchain.languageVersion.set(JavaLanguageVersion.of(25)) |
| 27 | } |
| 28 | |
| 29 | tasks.withType<JavaCompile>().configureEach { |
| 30 | options.encoding = "UTF-8" |
| 31 | options.release.set(25) |
| 32 | } |
| 33 | |
| 34 | tasks.processResources { |
| 35 | filteringCharset = "UTF-8" |
| 36 | } |
| 37 | |
| 38 | tasks.jar { |
| 39 | archiveBaseName.set("CopperKeys") |
| 40 | } |
| 41 | |
| 42 | tasks.register<Zip>("zipResourcePack") { |
| 43 | archiveBaseName.set("CopperKeys-resourcepack") |
| 44 | archiveVersion.set(project.version.toString()) |
| 45 | destinationDirectory.set(layout.buildDirectory.dir("dist")) |
| 46 | from("resource-pack") |
| 47 | } |
| 48 | |
| 49 | tasks.test { |
| 50 | useJUnitPlatform() |
| 51 | } |