From e69f22df8c28856d0ebd56220e1506ef614f6801 Mon Sep 17 00:00:00 2001 From: TheSuperGamer20578 <30369708+TheSuperGamer20578@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:43:25 +1100 Subject: [PATCH] Improved gradle build - Fixed conflicts from shadowJar - Removed jChroma from settings.gradle - Removed the unused curseforge publish plugin - Set project name to chromatic - Set source and target compatibility to Java 17 --- .github/workflows/release.yml | 2 +- build.gradle | 13 ++++++++++--- settings.gradle | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0fee25..022447f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,7 +79,7 @@ jobs: name: Chromatic ${{ steps.tag.outputs.tag }} version: ${{ steps.tag.outputs.tag }} changelog-file: CHANGELOG.md - files: "Chromatic Release/Chromatic-${{ steps.tag.outputs.version }}.jar" + files: "Chromatic Release/chromatic-${{ steps.tag.outputs.version }}.jar" - uses: tsickert/discord-webhook@v5.3.0 with: webhook-url: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/build.gradle b/build.gradle index cedf66d..ecaf1f7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ plugins { id 'com.github.johnrengelman.shadow' version '8.1.1' id 'com.palantir.git-version' version '3.0.0' id 'com.modrinth.minotaur' version '2.+' - id 'io.github.themrmilchmann.curseforge-publish' version '0.4.0' } @@ -36,6 +35,7 @@ if (hasProperty('ci')) { version = "${tag}${tag.contains('-') ? '.' : '-'}SNAPSHOT.${git.commitDistance}.${git.branchName}.${git.gitHash}+local" } group = 'io.github.thesupergamer20578' +java.sourceCompatibility = java.targetCompatibility = JavaVersion.VERSION_17 repositories { @@ -92,8 +92,15 @@ jar { shadowJar { archiveClassifier = 'unmapped' configurations = [project.configurations.shadow] - exclude 'META-INF' - exclude 'org/apache/commons/lang3/**' + minimize() { + exclude(dependency('com.github.hypfvieh:dbus-java-transport-.*:.*')) + } + enableRelocation true + relocationPrefix = "${project.group}.${project.name}.shadow" + relocate("${project.group}.${project.name}", "${project.group}.${project.name}") + relocate('org.freedesktop.dbus', 'org.freedesktop.dbus') + relocate('jnr', 'jnr') + relocate('com.kenai', 'com.kenai') } remapJar { diff --git a/settings.gradle b/settings.gradle index b64b0ec..44e5619 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,4 +9,4 @@ pluginManagement { } } -include 'lib:JChroma' +rootProject.name = 'chromatic'