aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranhgelus <anhgelus.morhtuuzh@proton.me>2025-06-01 19:57:52 +0000
committeranhgelus <anhgelus.morhtuuzh@proton.me>2025-06-01 19:57:52 +0000
commit19412dce07d3a10734e8820b551275da85692980 (patch)
treeec85d619b6bfe4b70c3472ec5719d5c4a71b6c04
parent2a4928e703690eee439b38a0be857eb0ff44b532 (diff)
build(fabric): upgrade everything
-rw-r--r--build.gradle28
-rw-r--r--gradle.properties8
-rw-r--r--src/main/resources/fabric.mod.json62
3 files changed, 54 insertions, 44 deletions
diff --git a/build.gradle b/build.gradle
index 31c6ce0..a6022a9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'fabric-loom' version '1.9-SNAPSHOT'
+ id 'fabric-loom' version '1.10-SNAPSHOT'
id 'maven-publish'
}
@@ -48,29 +48,43 @@ dependencies {
processResources {
inputs.property "version", project.version
+ inputs.property "minecraft_version", project.minecraft_version
+ inputs.property "loader_version", project.loader_version
+ filteringCharset "UTF-8"
filesMatching("fabric.mod.json") {
- expand "version": project.version
+ expand "version": project.version,
+ "minecraft_version": project.minecraft_version,
+ "loader_version": project.loader_version
}
}
+def targetJavaVersion = 21
tasks.withType(JavaCompile).configureEach {
- it.options.release = 21
+ // ensure that the encoding is set to UTF-8, no matter what the system default is
+ // this fixes some edge cases with special characters not displaying correctly
+ // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
+ // If Javadoc is generated, this must be specified in that task too.
+ it.options.encoding = "UTF-8"
+ if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
+ it.options.release.set(targetJavaVersion)
+ }
}
java {
+ def javaVersion = JavaVersion.toVersion(targetJavaVersion)
+ if (JavaVersion.current() < javaVersion) {
+ toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
+ }
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
-
- sourceCompatibility = JavaVersion.VERSION_21
- targetCompatibility = JavaVersion.VERSION_21
}
jar {
from("LICENSE") {
- rename { "${it}_${project.base.archivesName.get()}"}
+ rename { "${it}_${project.archivesBaseName}"}
}
}
diff --git a/gradle.properties b/gradle.properties
index 61c6321..66739a5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -5,14 +5,14 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.4
-yarn_mappings=1.21.4+build.1
-loader_version=0.16.9
+yarn_mappings=1.21.4+build.8
+loader_version=0.16.14
# Fabric API
-fabric_version=0.111.0+1.21.4
+fabric_version=0.119.3+1.21.4
# Libs
-midnightlib_version=1.6.6-fabric
+midnightlib_version=1.7.3+1.21.4-fabric
# Mod Properties
mod_version=1.2.0
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index fe49b5f..d218be5 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -1,35 +1,31 @@
{
- "schemaVersion": 1,
- "id": "manhunt",
- "version": "${version}",
- "name": "Manhunt",
- "description": "Best Manhunt Minecraft mod.",
- "authors": [
- "Anhgelus Morhtuuzh"
- ],
- "contact": {
- "sources": "https://github.com/anhgelus/manhunt-mod",
- "issues": "https://github.com/anhgelus/manhunt-mod/issues",
- "homepage": "https://modrinth.com/mod/manhunt-remastered"
- },
- "license": "AGPL-3.0",
- "icon": "assets/manhunt/icon.png",
- "environment": "server",
- "entrypoints": {
- "main": [
- "world.anhgelus.manhunt.Manhunt"
- ]
- },
- "mixins": [
- "manhunt.mixins.json"
- ],
- "depends": {
- "fabricloader": ">=0.16.7",
- "minecraft": "~1.21",
- "java": ">=21",
- "fabric": "*"
- },
- "suggests": {
- "difficultydeathscaler": "*"
- }
+ "schemaVersion": 1,
+ "id": "manhunt",
+ "version": "${version}",
+ "name": "Manhunt",
+ "description": "Best Manhunt Minecraft mod.",
+ "authors": [
+ "Anhgelus Morhtuuzh"
+ ],
+ "contact": {
+ "sources": "https://github.com/anhgelus/manhunt-mod",
+ "issues": "https://github.com/anhgelus/manhunt-mod/issues",
+ "homepage": "https://modrinth.com/mod/manhunt-remastered"
+ },
+ "license": "AGPL-3.0",
+ "icon": "assets/manhunt/icon.png",
+ "environment": "server",
+ "entrypoints": {
+ "main": [
+ "world.anhgelus.manhunt.Manhunt"
+ ]
+ },
+ "mixins": [
+ "manhunt.mixins.json"
+ ],
+ "depends": {
+ "fabricloader": ">=${loader_version}",
+ "fabric-api": "*",
+ "minecraft": "${minecraft_version}"
+ }
} \ No newline at end of file