From 4f4ee82e6b7842cfbd6d4e289cbad5de3944ac54 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 14 Mar 2023 19:46:12 +0000 Subject: [PATCH] Converted remaining groovy buildscripts to kotlin --- eco-api/build.gradle | 38 ------------ eco-api/build.gradle.kts | 42 +++++++++++++ eco-core/build.gradle | 8 --- eco-core/build.gradle.kts | 8 +++ eco-core/core-backend/build.gradle | 15 ----- eco-core/core-backend/build.gradle.kts | 15 +++++ eco-core/core-plugin/build.gradle | 85 -------------------------- eco-core/core-plugin/build.gradle.kts | 80 ++++++++++++++++++++++++ eco-core/core-proxy/build.gradle | 6 -- eco-core/core-proxy/build.gradle.kts | 6 ++ 10 files changed, 151 insertions(+), 152 deletions(-) delete mode 100644 eco-api/build.gradle create mode 100644 eco-api/build.gradle.kts delete mode 100644 eco-core/build.gradle create mode 100644 eco-core/build.gradle.kts delete mode 100644 eco-core/core-backend/build.gradle create mode 100644 eco-core/core-backend/build.gradle.kts delete mode 100644 eco-core/core-plugin/build.gradle create mode 100644 eco-core/core-plugin/build.gradle.kts delete mode 100644 eco-core/core-proxy/build.gradle create mode 100644 eco-core/core-proxy/build.gradle.kts diff --git a/eco-api/build.gradle b/eco-api/build.gradle deleted file mode 100644 index 58058254..00000000 --- a/eco-api/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -dependencies { - // Adventure - compileOnly 'net.kyori:adventure-platform-bukkit:4.1.0' - - // Other - compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT' - compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT' - compileOnly 'com.google.code.gson:gson:2.8.8' -} - -group 'com.willfp' -version rootProject.version - -java { - withJavadocJar() -} - -build.dependsOn publishToMavenLocal - -publishing { - publications { - shadow(MavenPublication) { - from components.java - artifactId 'eco' - } - } - - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/Auxilor/eco") - credentials { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } -} diff --git a/eco-api/build.gradle.kts b/eco-api/build.gradle.kts new file mode 100644 index 00000000..8f68532b --- /dev/null +++ b/eco-api/build.gradle.kts @@ -0,0 +1,42 @@ +dependencies { + // Adventure + compileOnly("net.kyori:adventure-platform-bukkit:4.1.0") + + // Other + compileOnly("org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT") + compileOnly("com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT") + compileOnly("com.google.code.gson:gson:2.8.8") +} + +group = "com.willfp" +version = rootProject.version + +java { + withJavadocJar() +} + +tasks { + build { + dependsOn(publishToMavenLocal) + } +} + +publishing { + publications { + create("shadow") { + from(components["java"]) + artifactId = "eco" + } + } + + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/Auxilor/eco") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} diff --git a/eco-core/build.gradle b/eco-core/build.gradle deleted file mode 100644 index 482988be..00000000 --- a/eco-core/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -group 'com.willfp' -version rootProject.version - -subprojects { - dependencies { - compileOnly project(":eco-api") - } -} diff --git a/eco-core/build.gradle.kts b/eco-core/build.gradle.kts new file mode 100644 index 00000000..36c1a21c --- /dev/null +++ b/eco-core/build.gradle.kts @@ -0,0 +1,8 @@ +group = "com.willfp" +version = rootProject.version + +subprojects { + dependencies { + compileOnly(project(":eco-api")) + } +} diff --git a/eco-core/core-backend/build.gradle b/eco-core/core-backend/build.gradle deleted file mode 100644 index c6988f09..00000000 --- a/eco-core/core-backend/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -group 'com.willfp' -version rootProject.version - -dependencies { - // Libraries - implementation 'org.reflections:reflections:0.9.12' - implementation 'org.objenesis:objenesis:3.2' - - compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT' - compileOnly 'me.clip:placeholderapi:2.10.10' - compileOnly 'net.kyori:adventure-text-minimessage:4.10.0' - compileOnly 'net.kyori:adventure-platform-bukkit:4.1.0' - compileOnly 'org.yaml:snakeyaml:1.33' - compileOnly 'com.moandjiezana.toml:toml4j:0.7.2' -} \ No newline at end of file diff --git a/eco-core/core-backend/build.gradle.kts b/eco-core/core-backend/build.gradle.kts new file mode 100644 index 00000000..73ed741e --- /dev/null +++ b/eco-core/core-backend/build.gradle.kts @@ -0,0 +1,15 @@ +group = "com.willfp" +version = rootProject.version + +dependencies { + // Libraries + implementation("org.reflections:reflections:0.9.12") + implementation("org.objenesis:objenesis:3.2") + + compileOnly("org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT") + compileOnly("me.clip:placeholderapi:2.10.10") + compileOnly("net.kyori:adventure-text-minimessage:4.10.0") + compileOnly("net.kyori:adventure-platform-bukkit:4.1.0") + compileOnly("org.yaml:snakeyaml:1.33") + compileOnly("com.moandjiezana.toml:toml4j:0.7.2") +} diff --git a/eco-core/core-plugin/build.gradle b/eco-core/core-plugin/build.gradle deleted file mode 100644 index 87971af1..00000000 --- a/eco-core/core-plugin/build.gradle +++ /dev/null @@ -1,85 +0,0 @@ -group 'com.willfp' -version rootProject.version - -dependencies { - compileOnly project(":eco-core:core-proxy") - compileOnly project(":eco-core:core-backend") - - // Libraries - implementation 'com.github.WillFP:Crunch:1.1.3' - implementation 'mysql:mysql-connector-java:8.0.25' - implementation 'org.jetbrains.exposed:exposed-core:0.37.3' - implementation 'org.jetbrains.exposed:exposed-dao:0.37.3' - implementation 'org.jetbrains.exposed:exposed-jdbc:0.37.3' - implementation 'com.zaxxer:HikariCP:5.0.0' - implementation 'net.kyori:adventure-platform-bukkit:4.1.0' - implementation 'org.javassist:javassist:3.28.0-GA' - implementation 'org.mongodb:mongodb-driver-sync:4.6.0' - implementation 'org.litote.kmongo:kmongo-coroutine:4.6.0' - implementation('com.moandjiezana.toml:toml4j:0.7.2') { - exclude group: 'com.google.code.gson', module: 'gson' - } - - // Included in spigot jar - compileOnly 'com.google.code.gson:gson:2.8.8' - compileOnly 'io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT' - - // Plugin dependencies - compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT' - compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.7-SNAPSHOT' - compileOnly 'com.github.TechFortress:GriefPrevention:16.17.1' - compileOnly('com.github.TownyAdvanced:Towny:0.97.2.6') { - exclude group: 'com.zaxxer', module: 'HikariCP' - } - compileOnly 'com.github.angeschossen:LandsAPI:6.26.18' - compileOnly 'com.github.angeschossen:PluginFrameworkAPI:1.0.0' - compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT' - compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd' - compileOnly 'com.gmail.nossr50.mcMMO:mcMMO:2.1.202' - compileOnly 'me.clip:placeholderapi:2.10.10' - compileOnly 'com.github.oraxen:oraxen:bea381fb82' - compileOnly 'com.github.brcdev-minecraft:shopgui-api:3.0.0' - compileOnly 'com.github.LoneDev6:API-ItemsAdder:2.4.7' - compileOnly 'com.arcaniax:HeadDatabase-API:1.3.0' - compileOnly 'com.gmail.filoghost.holographicdisplays:holographicdisplays-api:2.4.0' - compileOnly 'com.github.EssentialsX:Essentials:2.18.2' - compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:1.8.3' - compileOnly 'com.github.MilkBowl:VaultAPI:1.7' - compileOnly 'com.github.WhipDevelopment:CrashClaim:f9cd7d92eb' - compileOnly 'com.wolfyscript.wolfyutilities:wolfyutilities:3.16.0.0' - compileOnly 'com.github.decentsoftware-eu:decentholograms:2.1.2' - compileOnly 'com.github.Gypopo:EconomyShopGUI-API:1.4.6' - compileOnly 'com.github.N0RSKA:ScytherAPI:55a' - compileOnly 'com.ticxo.modelengine:api:R3.0.1' - compileOnly 'me.TechsCode:UltraEconomyAPI:1.0.0' - compileOnly 'com.github.Ssomar-Developement:SCore:3.4.7' - - // MythicMobs - compileOnly 'io.lumine:Mythic:5.2.1' - compileOnly 'io.lumine:LumineUtils:1.19-SNAPSHOT' - - // CombatLogX V10 + NewbieHelper Expansion - compileOnly 'com.SirBlobman.combatlogx:CombatLogX-API:10.0.0.0-SNAPSHOT' - - // CombatLogX V11 + NewbieHelper Expansion - compileOnly 'com.github.sirblobman.combatlogx:api:11.0.0.0-SNAPSHOT' - - // LibsDisguises - compileOnly 'LibsDisguises:LibsDisguises:10.0.26' - - // All other libs - compileOnly fileTree(dir: '../../lib', include: ['*.jar']) -} - -shadowJar { - minimize { - exclude(dependency('org.litote.kmongo:kmongo-coroutine:.*')) - exclude(dependency('org.jetbrains.exposed:.*:.*')) - } -} - -processResources { - filesNotMatching(["**/*.png", "**/models/**", "**/textures/**"]) { - expand projectVersion: project.version - } -} diff --git a/eco-core/core-plugin/build.gradle.kts b/eco-core/core-plugin/build.gradle.kts new file mode 100644 index 00000000..44fc1c79 --- /dev/null +++ b/eco-core/core-plugin/build.gradle.kts @@ -0,0 +1,80 @@ +group = "com.willfp" +version = rootProject.version + +dependencies { + compileOnly(project(":eco-core:core-proxy")) + compileOnly(project(":eco-core:core-backend")) + + // Libraries + implementation("com.github.WillFP:Crunch:1.1.3") + implementation("mysql:mysql-connector-java:8.0.25") + implementation("org.jetbrains.exposed:exposed-core:0.37.3") + implementation("org.jetbrains.exposed:exposed-dao:0.37.3") + implementation("org.jetbrains.exposed:exposed-jdbc:0.37.3") + implementation("com.zaxxer:HikariCP:5.0.0") + implementation("net.kyori:adventure-platform-bukkit:4.1.0") + implementation("org.javassist:javassist:3.28.0-GA") + implementation("org.mongodb:mongodb-driver-sync:4.6.0") + implementation("org.litote.kmongo:kmongo-coroutine:4.6.0") + implementation("com.moandjiezana.toml:toml4j:0.7.2") { + exclude(group = "com.google.code.gson", module = "gson") + } + + // Included in spigot jar + compileOnly("com.google.code.gson:gson:2.8.8") + compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT") + + // Plugin dependencies + compileOnly("com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT") + compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.7-SNAPSHOT") + compileOnly("com.github.TechFortress:GriefPrevention:16.17.1") + compileOnly("com.github.TownyAdvanced:Towny:0.97.2.6") { + exclude(group = "com.zaxxer", module = "HikariCP") + } + compileOnly("com.github.angeschossen:LandsAPI:6.26.18") + compileOnly("com.github.angeschossen:PluginFrameworkAPI:1.0.0") + compileOnly("fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT") + compileOnly("com.github.jiangdashao:matrix-api-repo:317d4635fd") + compileOnly("com.gmail.nossr50.mcMMO:mcMMO:2.1.202") + compileOnly("me.clip:placeholderapi:2.10.10") + compileOnly("com.github.oraxen:oraxen:bea381fb82") + compileOnly("com.github.brcdev-minecraft:shopgui-api:3.0.0") + compileOnly("com.github.LoneDev6:API-ItemsAdder:2.4.7") + compileOnly("com.arcaniax:HeadDatabase-API:1.3.0") + compileOnly("com.gmail.filoghost.holographicdisplays:holographicdisplays-api:2.4.0") + compileOnly("com.github.EssentialsX:Essentials:2.18.2") + compileOnly("com.bgsoftware:SuperiorSkyblockAPI:1.8.3") + compileOnly("com.github.MilkBowl:VaultAPI:1.7") + compileOnly("com.github.WhipDevelopment:CrashClaim:f9cd7d92eb") + compileOnly("com.wolfyscript.wolfyutilities:wolfyutilities:3.16.0.0") + compileOnly("com.github.decentsoftware-eu:decentholograms:2.1.2") + compileOnly("com.github.Gypopo:EconomyShopGUI-API:1.4.6") + compileOnly("com.github.N0RSKA:ScytherAPI:55a") + compileOnly("com.ticxo.modelengine:api:R3.0.1") + compileOnly("me.TechsCode:UltraEconomyAPI:1.0.0") + compileOnly("com.github.Ssomar-Developement:SCore:3.4.7") + compileOnly("io.lumine:Mythic:5.2.1") + compileOnly("io.lumine:LumineUtils:1.19-SNAPSHOT") + compileOnly("com.SirBlobman.combatlogx:CombatLogX-API:10.0.0.0-SNAPSHOT") + compileOnly("com.github.sirblobman.combatlogx:api:11.0.0.0-SNAPSHOT") + compileOnly("LibsDisguises:LibsDisguises:10.0.26") + + compileOnly(fileTree("../../lib") { + include("*.jar") + }) +} + +tasks { + shadowJar { + minimize { + exclude(dependency("org.litote.kmongo:kmongo-coroutine:.*")) + exclude(dependency("org.jetbrains.exposed:.*:.*")) + } + } + + processResources { + filesMatching(listOf("**plugin.yml", "**eco.yml")) { + expand("projectVersion" to project.version) + } + } +} diff --git a/eco-core/core-proxy/build.gradle b/eco-core/core-proxy/build.gradle deleted file mode 100644 index 5795f8bc..00000000 --- a/eco-core/core-proxy/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -group 'com.willfp' -version rootProject.version - -dependencies { - compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT' -} \ No newline at end of file diff --git a/eco-core/core-proxy/build.gradle.kts b/eco-core/core-proxy/build.gradle.kts new file mode 100644 index 00000000..aa3d2617 --- /dev/null +++ b/eco-core/core-proxy/build.gradle.kts @@ -0,0 +1,6 @@ +group = "com.willfp" +version = rootProject.version + +dependencies { + compileOnly("org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT") +}