From 365fe32645e9384eed65fc7aab074ad796452f8e Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Mon, 20 May 2024 20:48:40 +0530 Subject: [PATCH] chore: centralize versions in build.gradle --- .gitignore | 1 - .vscode/settings.json | 4 ++++ build.gradle | 9 ++++----- src/main/resources/fabric.mod.json | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index c476faf..e7e784d 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ classes/ # vscode .settings/ -.vscode/ bin/ .classpath .project diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a6b86d5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic", + "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable" +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index d18db53..990379b 100644 --- a/build.gradle +++ b/build.gradle @@ -40,9 +40,11 @@ dependencies { processResources { inputs.property "version", project.version - filesMatching("fabric.mod.json") { - expand "version": project.version + expand "version": project.version, + "java_version": ">=17", + "minecraft_version": "~${project.minecraft_version}", + "loader_version": ">=${project.loader_version}" } } @@ -51,9 +53,6 @@ tasks.withType(JavaCompile).configureEach { } java { - // 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_17 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 38a68a0..d233777 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -23,9 +23,9 @@ "elytra-lock.mixins.json" ], "depends": { - "fabricloader": ">=0.15.11", - "minecraft": "~1.20.4", - "java": ">=17", + "fabricloader": "${loader_version}", + "minecraft": "${minecraft_version}", + "java": "${java_version}", "fabric-api": "*" } } \ No newline at end of file