Skip to content

Commit

Permalink
Improved gradle build
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
TheSuperGamer20578 committed Oct 2, 2023
1 parent f0cf675 commit e69f22d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
Expand Down
13 changes: 10 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}


Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pluginManagement {
}
}

include 'lib:JChroma'
rootProject.name = 'chromatic'

0 comments on commit e69f22d

Please sign in to comment.