Skip to content

Commit 1f1174d

Browse files
Update gradle to version 9.2.1
1 parent 194ed6d commit 1f1174d

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
version = modVersion //To change the version of your mod, edit modVersion in gradle.properties
88
group = "com.wildermods"
9-
archivesBaseName = "examplemod"
9+
base.archivesName = "examplemod"
1010

1111
apply plugin: 'com.wildermods.workspace'
1212
apply from: 'replaceTokenScript.gradle' //see replaceTokenScript.gradle!
@@ -20,8 +20,11 @@ repositories {
2020
}
2121
}
2222

23-
sourceCompatibility = '17'
24-
targetCompatibility = '17'
23+
java {
24+
toolchain {
25+
languageVersion = JavaLanguageVersion.of(21)
26+
}
27+
}
2528

2629
wilderWorkspace {
2730
useDependency("1.16+559")

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

publishScript.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ tasks.register('checkArtifactExists') {
1212
}
1313

1414
def repoUrl = project.hasProperty('mavenRepoUrl') ? project.mavenRepoUrl : mavenLocalUrl
15-
def artifactPath = "${repoUrl}/${project.group.replace('.', '/')}/${project.archivesBaseName}/${project.version}/${project.archivesBaseName}-${project.version}.jar"
15+
def artifactPath = "${repoUrl}/${project.group.replace('.', '/')}/${project.base.archivesName}/${project.version}/${project.base.archivesName}-${project.version}.jar"
1616
logger.lifecycle("Checking if artifact exists at: $artifactPath")
1717

1818
if (artifactPath.startsWith('file:/')) {
1919
// Handle file URLs
2020
def file = new File(new URI(artifactPath))
2121
if (file.exists()) {
22-
throw new IllegalStateException("Artifact '${project.group}:${project.archivesBaseName}:${project.version}' already exists. Publishing aborted.")
22+
throw new IllegalStateException("Artifact '${project.group}:${project.base.archivesName}:${project.version}' already exists. Publishing aborted.")
2323
}
2424
} else {
2525
// Handle HTTP URLs
2626
def url = new URL(artifactPath)
2727
def connection = url.openConnection()
2828
connection.setRequestMethod('HEAD')
2929
if (connection.responseCode == 200) {
30-
throw new IllegalStateException("Artifact '${project.group}:${project.archivesBaseName}:${project.version}' already exists. Publishing aborted.")
30+
throw new IllegalStateException("Artifact '${project.group}:${project.base.archivesName}:${project.version}' already exists. Publishing aborted.")
3131
}
3232
}
3333
logger.lifecycle("Artifact does not exist, proceeding with publish.")
@@ -43,7 +43,7 @@ publishing {
4343
mavenJava(MavenPublication) {
4444
from components.java
4545
groupId = project.group
46-
artifactId = project.archivesBaseName
46+
artifactId = project.base.archivesName
4747
version = project.version
4848

4949
// Attach sources JAR to the publication

0 commit comments

Comments
 (0)