diff --git a/NMS/API/build.gradle b/NMS/API/build.gradle new file mode 100644 index 00000000..b2aa2412 --- /dev/null +++ b/NMS/API/build.gradle @@ -0,0 +1,17 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.willfp.ecoenchants.java-conventions' +} + +dependencies { + compileOnly 'org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT' +} + +jar{ + archiveName = findProperty("Name") + " v" + findProperty("version") + ".jar" +} + +description = 'EcoEnchants API' diff --git a/NMS/API/pom.xml b/NMS/API/pom.xml deleted file mode 100644 index ac9281cd..00000000 --- a/NMS/API/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - parent - com.willfp.ecoenchants - 5.2.3 - ../../pom.xml - - 4.0.0 - - API - EcoEnchants API - - - - org.spigotmc - spigot-api - 1.15.2-R0.1-SNAPSHOT - provided - - - \ No newline at end of file diff --git a/NMS/v1_15_R1/build.gradle b/NMS/v1_15_R1/build.gradle new file mode 100644 index 00000000..cc7b7fc3 --- /dev/null +++ b/NMS/v1_15_R1/build.gradle @@ -0,0 +1,18 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.willfp.ecoenchants.java-conventions' +} + +dependencies { + compileOnly project(':API') + compileOnly 'org.spigotmc:spigot:1.15.2-R0.1-SNAPSHOT' +} + +jar{ + archiveName = project.name + " v" + findProperty("version") + ".jar" +} + +description = 'v1_15_R1' diff --git a/NMS/v1_15_R1/pom.xml b/NMS/v1_15_R1/pom.xml deleted file mode 100644 index 92f2db15..00000000 --- a/NMS/v1_15_R1/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - parent - com.willfp.ecoenchants - 5.2.3 - ../../pom.xml - - 4.0.0 - - v1_15_R1 - - - - com.willfp.ecoenchants - API - ${project.parent.version} - provided - - - org.spigotmc - spigot - 1.15.2-R0.1-SNAPSHOT - provided - - - \ No newline at end of file diff --git a/NMS/v1_16_R1/build.gradle b/NMS/v1_16_R1/build.gradle new file mode 100644 index 00000000..bb7a75d7 --- /dev/null +++ b/NMS/v1_16_R1/build.gradle @@ -0,0 +1,18 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.willfp.ecoenchants.java-conventions' +} + +dependencies { + compileOnly project(':API') + compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT' +} + +jar{ + archiveName = project.name + " v" + findProperty("version") + ".jar" +} + +description = 'v1_16_R1' diff --git a/NMS/v1_16_R1/pom.xml b/NMS/v1_16_R1/pom.xml deleted file mode 100644 index 5cb609bd..00000000 --- a/NMS/v1_16_R1/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - parent - com.willfp.ecoenchants - 5.2.3 - ../../pom.xml - - 4.0.0 - - v1_16_R1 - - - - com.willfp.ecoenchants - API - ${project.parent.version} - provided - - - org.spigotmc - spigot - 1.16.1-R0.1-SNAPSHOT - provided - - - \ No newline at end of file diff --git a/NMS/v1_16_R2/build.gradle b/NMS/v1_16_R2/build.gradle new file mode 100644 index 00000000..09867a94 --- /dev/null +++ b/NMS/v1_16_R2/build.gradle @@ -0,0 +1,18 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.willfp.ecoenchants.java-conventions' +} + +dependencies { + compileOnly project(':API') + compileOnly 'org.spigotmc:spigot:1.16.2-R0.1-SNAPSHOT' +} + +jar{ + archiveName = project.name + " v" + findProperty("version") + ".jar" +} + +description = 'v1_16_R2' diff --git a/NMS/v1_16_R2/pom.xml b/NMS/v1_16_R2/pom.xml deleted file mode 100644 index 103bf50a..00000000 --- a/NMS/v1_16_R2/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - parent - com.willfp.ecoenchants - 5.2.3 - ../../pom.xml - - 4.0.0 - - v1_16_R2 - - - - com.willfp.ecoenchants - API - ${project.parent.version} - provided - - - org.spigotmc - spigot - 1.16.2-R0.1-SNAPSHOT - provided - - - \ No newline at end of file diff --git a/NMS/v1_16_R3/build.gradle b/NMS/v1_16_R3/build.gradle new file mode 100644 index 00000000..45836913 --- /dev/null +++ b/NMS/v1_16_R3/build.gradle @@ -0,0 +1,18 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.willfp.ecoenchants.java-conventions' +} + +dependencies { + compileOnly project(':API') + compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT' +} + +jar{ + archiveName = project.name + " v" + findProperty("version") + ".jar" +} + +description = 'v1_16_R3' diff --git a/NMS/v1_16_R3/pom.xml b/NMS/v1_16_R3/pom.xml deleted file mode 100644 index 483e8c3f..00000000 --- a/NMS/v1_16_R3/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - parent - com.willfp.ecoenchants - 5.2.3 - ../../pom.xml - - 4.0.0 - - v1_16_R3 - - - - com.willfp.ecoenchants - API - ${project.parent.version} - provided - - - org.spigotmc - spigot - 1.16.4-R0.1-SNAPSHOT - provided - - - \ No newline at end of file diff --git a/Plugin/build.gradle b/Plugin/build.gradle new file mode 100644 index 00000000..851d5500 --- /dev/null +++ b/Plugin/build.gradle @@ -0,0 +1,56 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'com.github.johnrengelman.shadow' version '5.2.0' + id 'com.willfp.ecoenchants.java-conventions' + id 'java' +} + +compileJava.dependsOn clean +build.dependsOn shadowJar + +dependencies { + implementation project(':API') + implementation project(':v1_15_R1') + implementation project(':v1_16_R1') + implementation project(':v1_16_R2') + implementation project(':v1_16_R3') + implementation 'org.apache.maven:maven-artifact:3.0.3' + implementation 'org.jetbrains:annotations:19.0.0' + implementation 'org.bstats:bstats-bukkit:1.7' + compileOnly 'org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT' + compileOnly 'commons-io:commons-io:2.8.0' + compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.4-SNAPSHOT' + compileOnly 'com.github.TechFortress:GriefPrevention:16.14.0' + compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10' + shadow files('../lib/Kingdoms-1.9.2.0.0.2.jar') + shadow files('../lib/SpartanAPI.jar') + compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0' + compileOnly 'com.github.angeschossen:LandsAPI:4.7.3' + compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT' + compileOnly 'de.janmm14:aac-api:4.2.0' + compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd' + compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT' + compileOnly 'net.ess3:EssentialsX:2.18.1' + compileOnly 'com.destroystokyo.paper:paper-api:1.16.3-R0.1-SNAPSHOT' + compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.157' + compileOnly 'me.clip:placeholderapi:2.10.9' +} + +shadowJar { + relocate('org.bstats.bukkit', 'com.willfp.ecoenchants.shaded.bstats') + relocate('org.jetbrains.annotations', 'com.willfp.ecoenchants.shaded.annotations') + relocate('org.apache.maven', 'com.willfp.ecoenchants.shaded.maven') { + exclude 'org.codehaus.plexus.util' + } + relocate('org.codehaus.plexus.util', 'com.willfp.ecoenchants.shaded.plexus') + archiveName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar" +} + +jar{ + archiveName = findProperty("plugin-name") + " v" + findProperty("version") + " " + "unshaded" + ".jar" +} + +description = 'EcoEnchants' diff --git a/Plugin/pom.xml b/Plugin/pom.xml deleted file mode 100644 index c316043b..00000000 --- a/Plugin/pom.xml +++ /dev/null @@ -1,285 +0,0 @@ - - - 4.0.0 - - - parent - com.willfp.ecoenchants - 5.2.3 - - - plugin - jar - - EcoEnchants - - - 1.8 - UTF-8 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - ${java.version} - ${java.version} - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - package - - shade - - - - org.codehaus.plexus:plexus-utils - - - - *:* - - META-INF/ - - - - - - org.jetbrains.annotations - com.willfp.ecoenchants.shaded.annotations - - - org.apache.maven - com.willfp.ecoenchants.shaded.maven - - - org.bstats - - com.willfp.ecoenchants.shaded.bstats - - - false - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - - com.willfp.ecoenchants.enchantments.ecoenchants.* - - - - org.apache.maven.plugins - maven-install-plugin - 2.4 - - - install-external-non-maven2-jar - initialize - - default - me.vagdedes - SpartanAPI - 1.0.0 - ${project.parent.basedir}/lib/SpartanAPI.jar - jar - true - - - install-file - - - - - - - - src/main/resources - true - - - - - - - org.spigotmc - spigot-api - 1.16.3-R0.1-SNAPSHOT - provided - - - com.willfp.ecoenchants - API - ${project.parent.version} - compile - - - com.willfp.ecoenchants - v1_15_R1 - ${project.parent.version} - compile - - - com.willfp.ecoenchants - v1_16_R1 - ${project.parent.version} - compile - - - com.willfp.ecoenchants - v1_16_R2 - ${project.parent.version} - compile - - - com.willfp.ecoenchants - v1_16_R3 - ${project.parent.version} - compile - - - org.apache.maven - maven-artifact - 3.0.3 - compile - - - commons-io - commons-io - 2.8.0 - provided - - - com.sk89q.worldguard - worldguard-bukkit - 7.0.4-SNAPSHOT - provided - - - com.github.TechFortress - GriefPrevention - 16.14.0 - provided - - - com.massivecraft - Factions - 1.6.9.5-U0.5.13 - provided - - - org.kingdoms - kingdoms - 1.0.0 - provided - - - com.github.TownyAdvanced - Towny - 0.96.2.0 - provided - - - com.github.angeschossen - LandsAPI - 4.7.3 - provided - - - org.jetbrains - annotations - 19.0.0 - compile - - - fr.neatmonster - nocheatplus - 3.16.1-SNAPSHOT - provided - - - de.janmm14 - aac-api - 4.2.0 - provided - - - com.github.jiangdashao - matrix-api-repo - 317d4635fd - provided - - - me.vagdedes - SpartanAPI - 1.0.0 - provided - - - com.comphenix.protocol - ProtocolLib - 4.6.0-SNAPSHOT - provided - - - net.ess3 - EssentialsX - 2.18.1 - provided - - - org.bstats - bstats-bukkit - 1.7 - compile - - - com.destroystokyo.paper - paper-api - 1.16.3-R0.1-SNAPSHOT - provided - - - me.clip - placeholderapi - 2.10.9 - provided - - - com.mojang - brigadier - - - com.tealcube.minecraft.bukkit - fanciful - - - - - com.gmail.nossr50.mcMMO - mcMMO - 2.1.157 - provided - - - diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/util/StringUtils.java b/Plugin/src/main/java/com/willfp/ecoenchants/util/StringUtils.java index bc9ca3bb..2c003c13 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/util/StringUtils.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/util/StringUtils.java @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.util; import com.willfp.ecoenchants.integrations.placeholder.PlaceholderManager; import net.md_5.bungee.api.ChatColor; import org.bukkit.entity.Player; -import scala.runtime.Static; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 00000000..04d80d2a --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,13 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. + id 'groovy-gradle-plugin' +} + +repositories { + // Use the plugin portal to apply community plugins in convention plugins. + gradlePluginPortal() +} diff --git a/buildSrc/src/main/groovy/com.willfp.ecoenchants.java-conventions.gradle b/buildSrc/src/main/groovy/com.willfp.ecoenchants.java-conventions.gradle new file mode 100644 index 00000000..eb8520db --- /dev/null +++ b/buildSrc/src/main/groovy/com.willfp.ecoenchants.java-conventions.gradle @@ -0,0 +1,114 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'java-library' + id 'maven-publish' +} + +repositories { + mavenCentral() + jcenter() + mavenLocal() + maven { + url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' + } + + maven { + url 'https://repo.codemc.org/repository/maven-public' + } + + maven { + url 'https://oss.sonatype.org/content/groups/public/' + } + + maven { + url 'https://maven.enginehub.org/repo/' + } + + maven { + url 'https://jitpack.io' + } + + maven { + url 'https://ci.ender.zone/plugin/repository/project/' + } + + maven { + url 'https://ci.ender.zone/plugin/repository/everything/' + } + + maven { + url 'https://repo.md-5.net/content/repositories/snapshots/' + } + + maven { + url 'https://repo.janmm14.de/repository/public/' + } + + maven { + url 'https://repo.dmulloy2.net/nexus/repository/public/' + } + + maven { + url 'https://papermc.io/repo/repository/maven-public/' + } + + maven { + url 'https://repo.maven.apache.org/maven2/' + } + + maven { + url 'https://repo.dustplanet.de/artifactory/ext-release-local/' + } + + maven { + url 'https://maven.seyfahni.de/repository/snapshots/' + } + + maven { + url 'https://libraries.minecraft.net/' + } + + maven { + url 'https://repo.spongepowered.org/maven/' + } + + maven { + url 'https://org.kitteh.pastegg' + } + + maven { + url 'http://repo.mikeprimm.com/' + } + + maven { + url 'http://maven.sk89q.com/repo/' + } + + maven { + url 'https://github.com/factions-site/repo/raw/public/' + } + + maven { + url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' + } +} + +group = 'com.willfp.ecoenchants' +archivesBaseName = project.name +version = project.version +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +publishing { + publications { + maven(MavenPublication) { + from(components.java) + } + } +} + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..84254089 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +version = 5.1.0 +plugin-name = EcoEnchants \ No newline at end of file diff --git a/pom.xml b/pom.xml deleted file mode 100644 index bc149675..00000000 --- a/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - 4.0.0 - - com.willfp.ecoenchants - parent - 5.2.3 - pom - EcoEnchants Parent - - - NMS/API - NMS/v1_15_R1 - NMS/v1_16_R1 - NMS/v1_16_R2 - NMS/v1_16_R3 - Plugin - - - - UTF-8 - ${project.basedir} - - - - - spigot-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - CodeMC - https://repo.codemc.org/repository/maven-public - - - sonatype - https://oss.sonatype.org/content/groups/public/ - - - sk89q-repo - https://maven.enginehub.org/repo/ - - - jitpack.io - https://jitpack.io - - - enderzone-projects - https://ci.ender.zone/plugin/repository/project/ - - - enderzone - https://ci.ender.zone/plugin/repository/everything/ - - - md_5-releases - https://repo.md-5.net/content/repositories/snapshots/ - - - janmm14-public - https://repo.janmm14.de/repository/public/ - - - dmulloy2-repo - https://repo.dmulloy2.net/nexus/repository/public/ - - - papermc - https://papermc.io/repo/repository/maven-public/ - - - placeholderapi - https://repo.extendedclip.com/content/repositories/placeholderapi/ - - - mcmmo-repo - http://repo.mcmmo.org/ - - - - - ${project.name} v${project.version} - clean package install - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-jar-plugin - 2.4 - - - - - \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..43504c68 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,18 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'parent' +include('v1_15_R1') +include('plugin') +include('API') +include('v1_16_R1') +include('v1_16_R2') +include('v1_16_R3') + +project(":v1_15_R1").projectDir = file('NMS/v1_15_R1') +project(":plugin").projectDir = file('Plugin') +project(":API").projectDir = file('NMS/API') +project(":v1_16_R1").projectDir = file('NMS/v1_16_R1') +project(":v1_16_R2").projectDir = file('NMS/v1_16_R2') +project(":v1_16_R3").projectDir = file('NMS/v1_16_R3') \ No newline at end of file