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 ffa7fde commit e76ec74
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 @@ -173,9 +173,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']) {
expand project.properties
expand props
}
getInputs().properties(props)
}

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

0 comments on commit e76ec74

Please sign in to comment.