1-
21import io.papermc.hangarpublishplugin.model.Platforms
32import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
43import xyz.jpenilla.runpaper.task.RunServer
4+ import kotlin.system.exitProcess
55
66plugins {
7- java
8- `java- library`
7+ id(" idea" )
8+ id(" java" )
9+ id(" java-library" )
910 id(" olf.build-logic" )
10- id(" com.diffplug.spotless" ) version " 6.18.0"
11- id(" io.github.goooler.shadow" ) version " 8.1.7"
12- id(" net.minecrell.plugin-yml.bukkit" ) version " 0.5.3"
13- id(" xyz.jpenilla.run-paper" ) version " 2.1.0"
14- idea
15-
16- id(" io.papermc.hangar-publish-plugin" ) version " 0.1.2"
17- id(" com.modrinth.minotaur" ) version " 2.+"
11+
12+ alias(libs.plugins.spotless)
13+ alias(libs.plugins.minotaur)
14+ alias(libs.plugins.shadow)
15+ alias(libs.plugins.hangar.publish.plugin)
16+ alias(libs.plugins.plugin.yml.bukkit)
17+ alias(libs.plugins.run.paper)
1818}
1919
2020if (! File (" $rootDir /.git" ).exists()) {
21- logger.lifecycle(
22- """
21+ logger.lifecycle("""
2322 **************************************************************************************
2423 You need to fork and clone this repository! Don't download a .zip file.
2524 If you need assistance, consult the GitHub docs: https://docs.github.com/get-started/quickstart/fork-a-repo
2625 **************************************************************************************
2726 """ .trimIndent()
28- ).also { System .exit (1 ) }
27+ ).also { exitProcess (1 ) }
2928}
29+
3030allprojects {
3131 group = " net.onelitefeather.bettergopaint"
3232 version = property(" projectVersion" ) as String // from gradle.properties
3333}
3434group = " net.onelitefeather.bettergopaint"
3535
36- val minecraftVersion = " 1.20.6"
3736val supportedMinecraftVersions = listOf (
38- " 1.20" ,
39- " 1.20.1" ,
40- " 1.20.2" ,
41- " 1.20.3" ,
42- " 1.20.4" ,
43- " 1.20.5" ,
44- " 1.20.6"
37+ " 1.20" ,
38+ " 1.20.1" ,
39+ " 1.20.2" ,
40+ " 1.20.3" ,
41+ " 1.20.4" ,
42+ " 1.20.5" ,
43+ " 1.20.6"
4544)
4645
4746repositories {
4847 mavenCentral()
49- maven {
50- name = " Paper"
51- url = uri(" https://papermc.io/repo/repository/maven-public/" )
52- }
53- maven {
54- name = " S01 Sonatype"
55- url = uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" )
56- }
48+ maven(" https://papermc.io/repo/repository/maven-public/" )
5749}
5850
5951dependencies {
6052 // Paper / Spigot
61- compileOnly(" io.papermc. paper:paper-api: $minecraftVersion -R0.1-SNAPSHOT " )
53+ compileOnly(libs. paper)
6254 // Fawe / WorldEdit
63- implementation(platform(" com.intellectualsites .bom:bom-newest:1.27 " ))
64- compileOnlyApi(" com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit " )
55+ implementation(platform(libs.fawe .bom))
56+ compileOnlyApi(libs.fawe.bukkit )
6557 // Utils
66- implementation(" dev.notmyfault. serverlib:ServerLib " )
67- implementation(" io.papermc: paperlib" )
58+ implementation(libs. serverlib)
59+ implementation(libs. paperlib)
6860 // Material Utils
69- implementation(" com.github.cryptomorin:XSeries:9.4.0 " ) { isTransitive = false }
61+ implementation(libs.xseries ) { isTransitive = false }
7062 // Stats
71- implementation(" org .bstats:bstats-bukkit:3.0.2 " )
63+ implementation(libs .bstats)
7264 // Commands
73- implementation(" org.incendo:cloud-annotations:2.0.0-rc.2" )
74- implementation(" org.incendo:cloud-minecraft-extras:2.0.0-beta.8" )
75- implementation(" org.incendo:cloud-paper:2.0.0-beta.8" )
76- annotationProcessor(" org.incendo:cloud-annotations:2.0.0-rc.2" )
77-
65+ implementation(libs.cloud.annotations)
66+ implementation(libs.cloud.minecraft.extras)
67+ implementation(libs.cloud.paper)
68+ annotationProcessor(libs.cloud.annotations)
7869}
7970
8071bukkit {
@@ -119,13 +110,13 @@ spotless {
119110}
120111
121112java {
122- toolchain {
123- languageVersion.set( JavaLanguageVersion .of( 21 ))
124- }
113+ toolchain.languageVersion.set( JavaLanguageVersion .of( 21 ))
114+ sourceCompatibility = JavaVersion . VERSION_21
115+ targetCompatibility = JavaVersion . VERSION_21
125116}
126117
127118tasks {
128- named< Jar >( " jar" ) {
119+ jar {
129120 archiveClassifier.set(" unshaded" )
130121 }
131122 compileJava {
@@ -141,11 +132,9 @@ tasks {
141132 relocate(" io.papermc.lib" , " $group .paperlib" )
142133 }
143134 }
144-
145- named(" build" ) {
135+ build {
146136 dependsOn(shadowJar)
147137 }
148-
149138 supportedMinecraftVersions.forEach { serverVersion ->
150139 register<RunServer >(" run-$serverVersion " ) {
151140 minecraftVersion(serverVersion)
@@ -199,6 +188,3 @@ if (!isRelease || isMainBranch) { // Only publish releases from the main branch
199188 loaders.add(" folia" )
200189 }
201190}
202-
203-
204-
0 commit comments