summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorGravatar Juuz2025-08-21 23:53:50 +0300
committerGravatar GitHub2025-08-21 21:53:50 +0100
commita61fe39f4e86ce5ab2c0615612deae1c51aff927 (patch)
tree8035d1659782571fd24980d89779d8287413e29e /build.gradle
parentGet rid of Guava (#555) (diff)
downloadenigma-a61fe39f4e86ce5ab2c0615612deae1c51aff927.tar.gz
enigma-a61fe39f4e86ce5ab2c0615612deae1c51aff927.tar.xz
enigma-a61fe39f4e86ce5ab2c0615612deae1c51aff927.zip
Update Gradle and fix buildscripts (#557)
* Fix Gradle configuration cache compat with generateResources task The task now also declares its inputs properly, making it support up-to-date checks. * Update Gradle and Shadow Shadow 9 is incompatible with including the flatlaf natives, so I updated to the last 8.x version which also works with Gradle 9. The Shadow plugin automatically publishes the shadow jar, so I removed the overlapping publications which overrode each other. * Fix more Gradle 10 deprecations * Enable configuration cache by default * Fix missing task dependency of :enigma-cli:test
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle14
1 files changed, 7 insertions, 7 deletions
diff --git a/build.gradle b/build.gradle
index 9f311844..caf78f1c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
1plugins { 1plugins {
2 id 'maven-publish' 2 id 'maven-publish'
3 id 'com.github.johnrengelman.shadow' version '8.1.1' apply false 3 id 'com.gradleup.shadow' version '8.3.9' apply false
4 id 'com.diffplug.spotless' version '7.2.1' 4 id 'com.diffplug.spotless' version '7.2.1'
5} 5}
6 6
@@ -13,7 +13,7 @@ subprojects {
13 repositories { 13 repositories {
14 mavenLocal() 14 mavenLocal()
15 mavenCentral() 15 mavenCentral()
16 maven { url 'https://maven.fabricmc.net/' } 16 maven { url = 'https://maven.fabricmc.net/' }
17 } 17 }
18 18
19 dependencies { 19 dependencies {
@@ -60,9 +60,9 @@ subprojects {
60 publishing { 60 publishing {
61 publications { 61 publications {
62 "$project.name"(MavenPublication) { 62 "$project.name"(MavenPublication) {
63 groupId project.group 63 groupId = project.group
64 artifactId project.name 64 artifactId = project.name
65 version project.version 65 version = project.version
66 from components.java 66 from components.java
67 } 67 }
68 } 68 }
@@ -89,10 +89,10 @@ allprojects {
89} 89}
90 90
91// A task to ensure that the version being released has not already been released. 91// A task to ensure that the version being released has not already been released.
92task checkVersion { 92tasks.register('checkVersion') {
93 doFirst { 93 doFirst {
94 def xml = new URL("https://maven.fabricmc.net/cuchaz/enigma/maven-metadata.xml").text 94 def xml = new URL("https://maven.fabricmc.net/cuchaz/enigma/maven-metadata.xml").text
95 def metadata = new XmlSlurper().parseText(xml) 95 def metadata = new groovy.xml.XmlSlurper().parseText(xml)
96 def versions = metadata.versioning.versions.version*.text(); 96 def versions = metadata.versioning.versions.version*.text();
97 if (versions.contains(version)) { 97 if (versions.contains(version)) {
98 throw new RuntimeException("${version} has already been released!") 98 throw new RuntimeException("${version} has already been released!")