Skip to content

Commit

Permalink
chore: ensure mod_version in resource files is not cached
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 21, 2024
1 parent c403bf5 commit 86adf51
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,19 @@ dependencies {
}

processResources {
def props = new HashMap<>(project.properties)
def keys = new ArrayList<String>(props.keySet()) //to avoid concurrent modification exception

for (String key : keys) {
if (!(props.get(key) instanceof String) && !(props.get(key) instanceof Integer)) {
props.remove(key)
}
}

filesMatching(['META-INF/neoforge.mods.toml', 'pack.mcmeta']) {
expand project.properties
expand props
}
getInputs().properties(props)
}

// Example for how to get properties into the manifest for reading by the runtime..
Expand Down

0 comments on commit 86adf51

Please sign in to comment.