From 0e0a6296ef3ffba796380b53a6254ecdb8788cf6 Mon Sep 17 00:00:00 2001 From: Jpuf0 Date: Tue, 17 Nov 2020 11:52:00 +0000 Subject: [PATCH] Maven -> Gradle --- NMS/API/build.gradle | 17 +++ NMS/v1_15_R1/build.gradle | 18 +++ NMS/v1_16_R1/build.gradle | 18 +++ NMS/v1_16_R2/build.gradle | 18 +++ NMS/v1_16_R3/build.gradle | 18 +++ Plugin/build.gradle | 56 +++++++++ .../willfp/ecoenchants/util/StringUtils.java | 1 - buildSrc/build.gradle | 13 ++ ...willfp.ecoenchants.java-conventions.gradle | 114 ++++++++++++++++++ gradle.properties | 2 + settings.gradle | 18 +++ 11 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 NMS/API/build.gradle create mode 100644 NMS/v1_15_R1/build.gradle create mode 100644 NMS/v1_16_R1/build.gradle create mode 100644 NMS/v1_16_R2/build.gradle create mode 100644 NMS/v1_16_R3/build.gradle create mode 100644 Plugin/build.gradle create mode 100644 buildSrc/build.gradle create mode 100644 buildSrc/src/main/groovy/com.willfp.ecoenchants.java-conventions.gradle create mode 100644 gradle.properties create mode 100644 settings.gradle 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/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_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_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_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/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/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/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