Skip to content

Commit

Permalink
Changed to gradle.kts + now automatically generating the plugin.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sarhatabaot committed Mar 10, 2023
1 parent 5233c15 commit 7cf4a9f
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 123 deletions.
99 changes: 0 additions & 99 deletions build.gradle

This file was deleted.

112 changes: 112 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
plugins {
id("java-library")
id("net.minecrell.plugin-yml.bukkit") version "0.5.3"
id("com.github.johnrengelman.shadow") version "8.1.0"
id("io.freefair.lombok") version "6.6.3"
id("org.sonarqube") version "4.0.0.2929"
}

group = "me.tychsen"
version = "1.7.3"

repositories {
mavenCentral()
maven (
url = "https://repo.aikar.co/content/groups/aikar/" )
maven (
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
)
maven (
url = "https://nexus.hc.to/content/repositories/pub_releases"
)
maven (
url = "https://oss.sonatype.org/content/groups/public/"
)
maven (
url = "https://repo.codemc.org/repository/maven-public"
)
maven (
url = "https://jitpack.io"
)
maven (
url = "https://repo.rosewooddev.io/repository/public/"
)
maven (
url = "https://repo.mattstudios.me/artifactory/public/"
)
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT")
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
compileOnly("org.black_ixx:playerpoints:3.2.3")

library("dev.triumphteam:triumph-gui:3.1.4")
library("net.kyori:adventure-api:4.9.2")

api("com.github.sarhatabaot:krakencore:1.6.3")
api("de.tr7zw:item-nbt-api:2.11.1")
api("co.aikar:acf-paper:0.5.1-SNAPSHOT")
api("org.bstats:bstats-bukkit:3.0.0")
api("org.jetbrains:annotations:24.0.1")
}

bukkit {
name = "EnchantGUI"
version = project.version.toString()
main = "me.tychsen.enchantgui.EnchantGUIPlugin"
apiVersion = "1.17"
website = "https://github.com/sarhatabaot/EnchantGUI"
authors = listOf("Dentych", "sarhatabaot")
softDepend = listOf("Vault", "PlayerPoints")

permissions {
register("eshop.use") {
description = "Gives access to /eshop."
default = net.minecrell.pluginyml.bukkit.BukkitPluginDescription.Permission.Default.TRUE
}
register("eshop.admin") {
description = "Gives access to /eshop reload."
}
register("eshop.all") {
description = "Gives access to all enchants and all levels of the enchants."
}
register("eshop.enchanting-table") {
description = "Gives access to the right click on enchanting table feature."
}
}
}

tasks {
build {
dependsOn(shadowJar)
}

shadowJar {
minimize()
archiveFileName.set("EnchantGUI-${project.version}.jar")
archiveClassifier.set("shadow")

relocate ("org.bstats", "me.tychsen.enchantgui.util")
relocate ("co.aikar.commands", "me.tychsen.enchantgui.acf")
relocate ("co.aikar.locales", "me.tychsen.enchantgui.locales")
relocate ("de.tr7zw", "me.tychsen.enchantgui.nbt")
relocate ("com.github.sarhatabaot.kraken", "me.tychsen.enchantgui.kraken")
}
}


sonarqube {
properties {
property("sonar.projectKey", "sarhatabaot_EnchantGUI")
property("sonar.organization", "sarhatabaot-github")
property("sonar.host.url", "https://sonarcloud.io")
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(16))
}
}

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "EnchantGUI"
22 changes: 0 additions & 22 deletions src/main/resources/plugin.yml

This file was deleted.

0 comments on commit 7cf4a9f

Please sign in to comment.