From b1ce6ad66212cd07ec93d274688a539b367535c2 Mon Sep 17 00:00:00 2001 From: Niklas <95505222+CrazyCloudCraft@users.noreply.github.com> Date: Sun, 17 Nov 2024 12:06:47 +0000 Subject: [PATCH] changes --- build.gradle | 33 ++++---- gradle.properties | 40 ++++----- pom.xml | 80 +++++++----------- pom.xml.old | 201 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 265 insertions(+), 89 deletions(-) create mode 100644 pom.xml.old diff --git a/build.gradle b/build.gradle index 7b6b442..17f4881 100644 --- a/build.gradle +++ b/build.gradle @@ -4,37 +4,22 @@ plugins { id 'java' id 'jacoco' id 'base' + id 'maven-publish' } java { sourceCompatibility = JavaVersion.toVersion(project.javaVersion) targetCompatibility = JavaVersion.toVersion(project.javaVersion) } -/* ext { // Dependency versions - SpigotAPI = "1.21.3-R0.1-SNAPSHOT" - AuthLib = "1.5.26" - WorldEdit = "7.3.6-SNAPSHOT" - FAWE = "2.12.0" - VaultAPI = "1.7.1" - PlaceholderAPI = "2.11.6" - Lombok = "1.18.34" - CommonsIO = "2.17.0" - Minimessage = "4.17.0" - SnakeYAML = "2.3" -} */ base { archivesName = "${project.pluginname}" } - repositories { mavenCentral() maven { url "https://jitpack.io" } - //maven { url "https://libraries.minecraft.net" } - //maven { url "https://hub.spigotmc.org/nexus/content/repositories/public/" } // Plugin repositories maven { url "https://repo.extendedclip.com/content/repositories/placeholderapi/" } - //maven { url "https://ci.athion.net/job/FastAsyncWorldEdit/ws" } maven { url "https://maven.enginehub.org/repo/" } } @@ -71,7 +56,6 @@ dependencies { } processResources { - //project.properties.put("version", this.version) // Add version to properties expand project.properties // Replace placeholders in resources from(sourceSets.main.resources.srcDirs) { include 'plugin.yml' // Ensure plugin.yml is included @@ -122,6 +106,21 @@ test { ignoreFailures = false } +publishing { + publications { + customLibrary(MavenPublication) { + from components.java + } + } + + repositories { + maven { + name = "${project.pluginname}" + url = layout.buildDirectory.dir("repo") + } + } +} + tasks.build.dependsOn tasks.shadowJar defaultTasks 'build' \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f0e8b29..58431bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,24 +1,24 @@ # Welcome, in this file you can set the variables for the builder and plugin.yml -javaVersion = 21 -group = de.butzlabben -pluginname = WorldSystem -authors = [Butzlabben, Trainerlord, Cycodly] -version = 2.4.39 -description = WorldSystem plugin to create per player worlds -apiversion = 1.21 -minecraft = 1.21.3 -depend = [WorldEdit] -softdepend = [PlaceholderAPI, Vault] +javaVersion=21 +group=de.butzlabben +pluginname=WorldSystem +authors=[Butzlabben, Trainerlord, Cycodly] +version=2.4.39 +description=WorldSystem plugin to create per player worlds +apiversion=1.21 +minecraft=1.21.3 +depend=[WorldEdit] +softdepend=[PlaceholderAPI, Vault] # Dependencies -SpigotAPI = 1.21.3-R0.1-SNAPSHOT -AuthLib = 1.5.26 -WorldEdit = 7.3.6-SNAPSHOT -FAWE = 2.12.0 -VaultAPI = 1.7.1 -PlaceholderAPI = 2.11.6 -Lombok = 1.18.34 -CommonsIO = 2.17.0 -Minimessage = 4.17.0 -SnakeYAML = 2.3 \ No newline at end of file +SpigotAPI=1.21.3-R0.1-SNAPSHOT +AuthLib=1.5.26 +WorldEdit=7.3.6-SNAPSHOT +FAWE=2.12.0 +VaultAPI=1.7.1 +PlaceholderAPI=2.11.6 +Lombok=1.18.34 +CommonsIO=2.17.0 +Minimessage=4.17.0 +SnakeYAML=2.3 \ No newline at end of file diff --git a/pom.xml b/pom.xml index acc868a..ca0e2ca 100644 --- a/pom.xml +++ b/pom.xml @@ -4,37 +4,22 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - initialize - - read-project-properties - - - - gradle.properties - - - - - - - - - ${group} - ${pluginname} - ${version} + de.butzlabben + WorldSystem + 2.4.39 - ${javaVersion} - ${javaVersion} + 21 + 21 UTF-8 + WorldSystem + ${group} + [Butzlabben, Trainerlord, Cycodly] + WorldSystem plugin to create per player worlds + 1.21 + 1.21.3 + [WorldEdit] + [PlaceholderAPI, Vault] @@ -57,7 +42,7 @@ com.intellectualsites.bom bom-newest - 1.41 + 1.50 import pom @@ -69,28 +54,28 @@ org.yaml snakeyaml - ${project.SnakeYAML} + 2.3 net.kyori adventure-text-minimessage - ${project.Minimessage} + 4.17.0 org.projectlombok lombok - ${project.Lombok} + 1.18.34 provided org.projectlombok lombok - ${project.Lombok} + 1.18.34 test @@ -98,63 +83,63 @@ commons-io commons-io - ${project.CommonsIO} + 2.17.0 me.clip placeholderapi - ${project.PlaceholderAPI} + 2.11.6 provided com.github.MilkBowl VaultAPI - ${project.VaultAPI} + 1.7.1 provided com.mojang authlib - ${project.AuthLib} + 1.5.26 provided org.spigotmc spigot-api - ${project.SpigotAPI} + 1.21.3-R0.1-SNAPSHOT provided com.sk89q.worldedit worldedit-bukkit - ${project.WorldEdit} + 7.3.6-SNAPSHOT provided com.sk89q.worldedit worldedit-core - ${project.WorldEdit} + 7.3.6-SNAPSHOT provided com.fastasyncworldedit FastAsyncWorldEdit-Bukkit - ${project.FAWE} + 2.12.0 provided com.fastasyncworldedit FastAsyncWorldEdit-Core - ${project.FAWE} + 2.12.0 provided @@ -180,13 +165,4 @@ test - - - - src/main/resources - true - - plugin.yml - - - \ No newline at end of file + \ No newline at end of file diff --git a/pom.xml.old b/pom.xml.old new file mode 100644 index 0000000..cb3f007 --- /dev/null +++ b/pom.xml.old @@ -0,0 +1,201 @@ + + + 4.0.0 + + ${group} + ${pluginname} + ${version} + + + ${javaVersion} + ${javaVersion} + UTF-8 + ${pluginname} + ${group} + ${version} + ${authors} + ${description} + ${apiversion} + ${depend} + ${softdepend} + + + + + jitpack + https://jitpack.io + + + minecraft + https://repo.extendedclip.com/content/repositories/placeholderapi/ + + + spigot + https://maven.enginehub.org/repo/ + + + + + + + com.intellectualsites.bom + bom-newest + 1.50 + import + pom + + + + + + + + org.yaml + snakeyaml + ${SnakeYAML} + + + + + net.kyori + adventure-text-minimessage + ${Minimessage} + + + + + org.projectlombok + lombok + ${Lombok} + provided + + + + org.projectlombok + lombok + ${Lombok} + test + + + + + commons-io + commons-io + ${CommonsIO} + + + + + me.clip + placeholderapi + ${PlaceholderAPI} + provided + + + + com.github.MilkBowl + VaultAPI + ${VaultAPI} + provided + + + + com.mojang + authlib + ${AuthLib} + provided + + + + org.spigotmc + spigot-api + ${SpigotAPI} + provided + + + + com.sk89q.worldedit + worldedit-bukkit + ${WorldEdit} + provided + + + + com.sk89q.worldedit + worldedit-core + ${WorldEdit} + provided + + + + com.fastasyncworldedit + FastAsyncWorldEdit-Bukkit + ${FAWE} + provided + + + + com.fastasyncworldedit + FastAsyncWorldEdit-Core + ${FAWE} + provided + + + + + org.junit.jupiter + junit-jupiter + 5.+ + test + + + + org.mockito + mockito-core + 5.+ + test + + + + org.assertj + assertj-core + 3.+ + test + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.2.1 + + + initialize + + read-project-properties + + + + gradle.properties + + + + + + + + + + src/main/resources + true + + plugin.yml + + + + + \ No newline at end of file