Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
with:
ref: ${{ env.COMMIT_SHA }}

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4.5.0
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'

- name: Setup Gradle
Expand Down
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

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

apply plugin: 'com.wildermods.workspace'
apply from: 'replaceTokenScript.gradle' //see replaceTokenScript.gradle!
Expand All @@ -20,8 +20,11 @@ repositories {
}
}

sourceCompatibility = '17'
targetCompatibility = '17'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

wilderWorkspace {
useDependency("1.16+559")
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
wilderforge_version = "0.4.3.0"
workspace_version = "5.2.1.0"
workspace_version = "6.5.1.0"

#Define the library by defining its module and version reference.
[libraries]
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 4 additions & 4 deletions publishScript.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ tasks.register('checkArtifactExists') {
}

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

if (artifactPath.startsWith('file:/')) {
// Handle file URLs
def file = new File(new URI(artifactPath))
if (file.exists()) {
throw new IllegalStateException("Artifact '${project.group}:${project.archivesBaseName}:${project.version}' already exists. Publishing aborted.")
throw new IllegalStateException("Artifact '${project.group}:${project.base.archivesName}:${project.version}' already exists. Publishing aborted.")
}
} else {
// Handle HTTP URLs
def url = new URL(artifactPath)
def connection = url.openConnection()
connection.setRequestMethod('HEAD')
if (connection.responseCode == 200) {
throw new IllegalStateException("Artifact '${project.group}:${project.archivesBaseName}:${project.version}' already exists. Publishing aborted.")
throw new IllegalStateException("Artifact '${project.group}:${project.base.archivesName}:${project.version}' already exists. Publishing aborted.")
}
}
logger.lifecycle("Artifact does not exist, proceeding with publish.")
Expand All @@ -43,7 +43,7 @@ publishing {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.archivesBaseName
artifactId = project.base.archivesName
version = project.version

// Attach sources JAR to the publication
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ pluginManagement {
maven {
url 'https://maven.wildermods.com'
}
maven {
url 'https://central.sonatype.com/repository/maven-snapshots/'
}
}
plugins {
id 'com.wildermods.workspace' version getVersionFromToml('workspace_version')
Expand Down
Loading