Skip to content

Commit

Permalink
Store mods-forge.toml separately too
Browse files Browse the repository at this point in the history
Otherwise building NeoForge overwrites it.
  • Loading branch information
YaLTeR committed Apr 2, 2024
1 parent b6db02b commit 416a7af
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Auto-generated
/src/main/resources/META-INF/mods.toml

# eclipse
bin
*.launch
Expand Down
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ minecraft {
}
}

tasks.register("fixModsToml", Copy) {
// Copy the mods-forge.toml file to mods.toml
from "src/main/resources/META-INF"
include "mods-forge.toml"
rename "mods-forge.toml", "mods.toml"
into "src/main/resources/META-INF"
}

// Make the fixModsToml task run before the processResources task
processResources.dependsOn(fixModsToml)

processResources {
inputs.property "version", project.mod_version
filesMatching("META-INF/mods.toml") {
expand "version": project.mod_version
}
}

dependencies {
minecraft 'net.minecraftforge:forge:1.20.2-48.0.13'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ issueTrackerURL="https://github.com/YaLTeR/MouseTweaks/issues"

[[mods]]
modId="mousetweaks"
version="${file.jarVersion}"
version="${version}"
displayName="Mouse Tweaks"
displayURL="https://minecraft.curseforge.com/projects/mouse-tweaks"
logoFile="mousetweaks_logo.png"
Expand Down

0 comments on commit 416a7af

Please sign in to comment.