diff --git a/build.gradle b/build.gradle index 27f4485c4..f4bd80f1f 100644 --- a/build.gradle +++ b/build.gradle @@ -191,9 +191,19 @@ dependencies { } processResources { + def props = new HashMap<>(project.properties) + def keys = new ArrayList(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..