From f48bad4f535d7078ae542bde2d4505e0ff796215 Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Fri, 21 Jul 2023 01:05:59 -0400 Subject: [PATCH] Vault please fix your build script --- .github/workflows/build_release.yml | 50 ------------------- build.gradle.kts | 18 ++----- buildSrc/settings.gradle.kts | 2 - .../src/main/kotlin/paper-plugin.gradle.kts | 4 -- .../src/main/kotlin/root-plugin.gradle.kts | 4 -- core/build.gradle.kts | 8 +-- gradle.properties | 1 - gradle/wrapper/gradle-wrapper.properties | 2 +- paper/build.gradle.kts | 44 ++++------------ .../api/frame/items/BaseItemBuilder.java | 1 - 10 files changed, 20 insertions(+), 114 deletions(-) delete mode 100644 .github/workflows/build_release.yml diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml deleted file mode 100644 index 48d4a90..0000000 --- a/.github/workflows/build_release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Release Build -on: - push: - branches: - - main - - dev - workflow_dispatch: - inputs: - logLevel: - description: 'Log Level' - required: false - default: 'warning' - -jobs: - build: - runs-on: ubuntu-latest - if: "!contains(github.event.commits[0].message, '[ci-skip]')" - steps: - - uses: actions/checkout@main - - uses: gradle/wrapper-validation-action@v1 - - uses: actions/setup-java@main - with: - distribution: temurin - java-version: 17 - - - name: Gradle Properties Import. - shell: bash - run: cat gradle.properties >> $GITHUB_ENV - - #- name: Make gradlew executable - # run: chmod +x ./gradlew - - #- name: Shadow Jar - # run: ./gradlew shadowJar --stacktrace - - #- name: Modrinth Publish - # run: ./gradlew modrinth --stacktrace - # env: - # MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - - #- name: Repo Publish - # run: ./gradlew publish --stacktrace - # env: - # REPOSITORY_USERNAME: ${{ secrets.CRAZYCREW_USERNAME }} - # REPOSITORY_PASSWORD: ${{ secrets.CRAZYCREW_PASSWORD }} - #- name: Update Notification - # run: | - # ./gradlew webhook --stacktrace - # env: - # DISCORD_WEBHOOK: ${{ secrets.CRAZYCREW_WEBHOOK }} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 2e0366e..c8d6609 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,25 +27,17 @@ allprojects { if (this.name == "paper") { dependencies { - compileOnly("de.tr7zw", "item-nbt-api", "2.11.3") compileOnly("org.bstats", "bstats-bukkit", "3.0.2") - compileOnly("com.github.MilkBowl", "VaultAPI", "1.7") + compileOnly("org.bstats", "bstats-bukkit", "3.0.2") + + compileOnly("com.github.MilkBowl", "VaultAPI", "1.7") { + exclude("org.bukkit", "bukkit") + } } } - //if (this.name == "core") { - // dependencies { - //compileOnly("net.kyori", "adventure-api", "4.12.0") - //compileOnly("net.kyori", "adventure-text-minimessage", "4.12.0") - - //compileOnly("com.google.code.gson", "gson", "2.10.1") - // } - //} - dependencies { - //compileOnly("net.kyori", "adventure-platform-bukkit", "4.3.0") - compileOnly("ch.jalu", "configme", "1.3.1") compileOnly("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") { diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index e96e72f..860fd1b 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -2,8 +2,6 @@ dependencyResolutionManagement { repositories { gradlePluginPortal() - maven("https://repo.papermc.io/repository/maven-public/") - maven("https://repo.crazycrew.us/first-party/") maven("https://repo.crazycrew.us/third-party/") } diff --git a/buildSrc/src/main/kotlin/paper-plugin.gradle.kts b/buildSrc/src/main/kotlin/paper-plugin.gradle.kts index 0466172..e71a6b0 100644 --- a/buildSrc/src/main/kotlin/paper-plugin.gradle.kts +++ b/buildSrc/src/main/kotlin/paper-plugin.gradle.kts @@ -4,10 +4,6 @@ plugins { id("io.papermc.paperweight.userdev") } -repositories { - maven("https://repo.papermc.io/repository/maven-public/") -} - dependencies { paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT") } diff --git a/buildSrc/src/main/kotlin/root-plugin.gradle.kts b/buildSrc/src/main/kotlin/root-plugin.gradle.kts index c136b53..1653434 100644 --- a/buildSrc/src/main/kotlin/root-plugin.gradle.kts +++ b/buildSrc/src/main/kotlin/root-plugin.gradle.kts @@ -26,8 +26,4 @@ tasks { options.encoding = Charsets.UTF_8.name() options.release.set(17) } - - processResources { - filteringCharset = "UTF-8" - } } \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts index d02117e..36568e0 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,12 +1,12 @@ plugins { - id("root-plugin") + id("paper-plugin") } group = "${rootProject.group}.core" version = rootProject.version base { - archivesName = "${rootProject.name}-${project.name}" + archivesName.set("${rootProject.name}-${project.name}") } tasks { @@ -18,8 +18,8 @@ tasks { } shadowJar { - archiveBaseName = "${rootProject.name}-${project.name}" - archiveClassifier = "" + archiveBaseName.set("${rootProject.name}-${project.name}") + archiveClassifier.set("") mergeServiceFiles() } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c7fb8b8..72a1c9a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,6 @@ org.gradle.parallel=false org.gradle.warning.mode = all authors = ["Ryderbelserion, Badbones69"] -description = Auction off your items in style. website = https://modrinth.com/plugin/crazyauctions sources = https://github.com/Crazy-Crew/CrazyAuctions issues = https://github.com/Crazy-Crew/CrazyAuctions/issues \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9f4197d..0419a89 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,4 +4,4 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 693fe3f..1257abc 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -6,49 +6,25 @@ group = "${rootProject.group}.paper" version = rootProject.version base { - archivesName = "${rootProject.name}-${project.name}" -} - -repositories { - //flatDir { dirs("libs") } - - maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") - - //maven("https://repo.triumphteam.dev/snapshots/") + archivesName.set("${rootProject.name}-${project.name}") } dependencies { implementation(project(":core")) - - //compileOnly(fileTree("libs").include("*.jar")) - - compileOnly("me.clip", "placeholderapi", "2.11.3") - - //compileOnly("dev.triumphteam", "triumph-cmd-bukkit", "2.0.0-SNAPSHOT") - compileOnly("com.github.decentsoftware-eu", "decentholograms","2.8.3") } tasks { - reobfJar { - outputJar = file("$buildDir/libs/${rootProject.name}-${project.name}-${project.version}.jar") - } - processResources { + val props = mapOf( + "name" to rootProject.name, + "group" to project.group, + "version" to project.version, + "description" to rootProject.description, + "apiVersion" to "1.20" + ) + filesMatching("paper-plugin.yml") { - expand( - "name" to rootProject.name, - "group" to project.group, - "version" to project.version, - "description" to rootProject.description - ) + expand(props) } } - - shadowJar { - //listOf( - // "dev.jorel.commandapi" - //).forEach { - // relocate(it, "libs.$it") - //} - } } \ No newline at end of file diff --git a/paper/src/main/java/com/badbones69/crazyauctions/api/frame/items/BaseItemBuilder.java b/paper/src/main/java/com/badbones69/crazyauctions/api/frame/items/BaseItemBuilder.java index 6209027..5b4956c 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/api/frame/items/BaseItemBuilder.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/frame/items/BaseItemBuilder.java @@ -49,7 +49,6 @@ import java.util.Objects; import java.util.UUID; import java.util.stream.Collectors; -@SuppressWarnings("unchecked") public class BaseItemBuilder> { private final ItemUtils SKULL_CHECKER = new ItemUtils();