From 30dcd5dfa878263e4578ba727d5c6aa8e3571043 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 3 Feb 2022 11:35:39 +0000 Subject: [PATCH] Depend on the reborn core version it was built against. --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 443ef92fd..5994cdb7d 100644 --- a/build.gradle +++ b/build.gradle @@ -137,6 +137,20 @@ allprojects { } } +processResources { + doLast { + // Depend on the reborn core version it was built against + fileTree(dir: outputs.files.asPath, include: "fabric.mod.json").each { + def jsonSlurper = new JsonSlurper() + def modJson = jsonSlurper.parseText(it.text) + + modJson.depends.reborncore = "~${project.version}" + + it.text = JsonOutput.toJson(modJson) + } + } +} + loom { accessWidenerPath = file("src/main/resources/techreborn.accesswidener") }