Update NeoForge buildscript

This commit is contained in:
Aizistral
2026-03-27 22:46:23 +01:00
parent 25d23f0fad
commit 46643aa46a

View File

@@ -3,11 +3,15 @@ plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.1.20'
id 'net.neoforged.gradle.userdev' version '7.1.21'
id "com.modrinth.minotaur" version "2.+"
id "com.matthewprenger.cursegradle" version "1.4.0"
}
tasks.named('wrapper', Wrapper).configure {
distributionType = Wrapper.DistributionType.BIN
}
version = project.mod_version
group = 'com.aizistral.nochatrestrictions'
@@ -19,8 +23,8 @@ base {
archivesName = 'NoChatRestrictions'
}
// Mojang ships Java 21 to end users in 1.20.5+, so your mod should target Java 21.
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
// Mojang ships Java 25 to end users in 26.1, so mods should target Java 25.
java.toolchain.languageVersion = JavaLanguageVersion.of(25)
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
@@ -51,11 +55,15 @@ runs {
server {
systemProperty 'forge.enabledGameTestNamespaces', 'nochatrestrictions'
programArgument '--nogui'
argument '--nogui'
}
}
configurations {
runtimeClasspath.extendsFrom localRuntime
}
dependencies {
implementation "net.neoforged:neoforge:${neo_version}"
}