mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Update Forge mods.toml automatically
This commit is contained in:
@@ -149,3 +149,14 @@ unifiedPublishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update mods.toml with the new versions automatically
|
||||
// Not using processResources because it is easier to do this manually, and see it reflected immediately
|
||||
afterEvaluate {
|
||||
file("src/main/resources/META-INF/mods.toml").withOutputStream {
|
||||
it << file("mods.toml").text
|
||||
.replaceAll("@LOADER_MAJOR@", rootProject.forge_version.split("\\.")[0])
|
||||
.replaceAll("@MINECRAFT_VERSION@", rootProject.architectury.minecraft)
|
||||
.replaceAll("@FORGE_VERSION@", rootProject.forge_version)
|
||||
}
|
||||
}
|
||||
|
||||
29
forge/mods.toml
Normal file
29
forge/mods.toml
Normal file
@@ -0,0 +1,29 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "[@LOADER_MAJOR@,)"
|
||||
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
|
||||
license = "GNU LGPLv3"
|
||||
|
||||
[[mods]]
|
||||
modId = "architectury"
|
||||
version = "${version}"
|
||||
displayName = "Architectury"
|
||||
authors = "shedaniel"
|
||||
description = '''
|
||||
A intermediary api aimed to ease developing multiplatform mods.
|
||||
'''
|
||||
logoFile = "icon.png"
|
||||
license = "LGPL-3"
|
||||
|
||||
[[dependencies.architectury]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[@MINECRAFT_VERSION@,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.architectury]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[@FORGE_VERSION@,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
@@ -1,5 +1,5 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "[38,)"
|
||||
loaderVersion = "[40,)"
|
||||
issueTrackerURL = "https://github.com/shedaniel/architectury/issues"
|
||||
license = "GNU LGPLv3"
|
||||
|
||||
@@ -24,6 +24,6 @@ side = "BOTH"
|
||||
[[dependencies.architectury]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[38.0.17,)"
|
||||
versionRange = "[40.1.14,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
Reference in New Issue
Block a user