Add loom.modVersion to read the version from the fabric.mod.json file. (#489)

This commit is contained in:
modmuss50
2021-09-10 16:06:37 +01:00
committed by GitHub
parent 2bc7522a26
commit 2c464cdef3
7 changed files with 102 additions and 11 deletions

View File

@@ -196,4 +196,12 @@ public interface LoomGradleExtensionAPI {
*/
@ApiStatus.Experimental
void disableDeprecatedPomGeneration(MavenPublication publication);
/**
* Reads the mod version from the fabric.mod.json file located in the main sourcesets resources.
* This is useful if you want to set the gradle version based of the version in the fabric.mod.json file.
*
* @return the version defined in the fabric.mod.json
*/
String getModVersion();
}