Fabric runClient task error

Execution failed for task ‘:processResources’.
Could not copy file ‘D:\game & game developement\Fabric-mod-1.19\src\main\resources\fabric.mod.json’ to ‘D:\game & game developement\Fabric-mod-1.19\build\resources\main\fabric.mod.json’.
No signature of method: java.math.BigDecimal.call() is applicable for argument types: (BigDecimal) values: [0.1]
Possible solutions: scale(), add(java.math.BigDecimal), max(java.math.BigDecimal), wait(), abs(), ulp()

  • Try:
    Run with --stacktrace option to get the stack trace.
    Run with --info or --debug option to get more log output.
    Run with --scan to get full insights.

That’s probably more a Groovy question than a Gradle question.
You somewhere have something like

2.3(0.1)

or

def a = 2.3
a(0.1)

maybe by accidentally declaring a local variable with the same name as some method you then try to call later with 0.1.

If you run with --stacktrace it should tell you where.

I just had this same exact error and found the solution.
You may have input an incorrect value for "version" in your fabric.mod.json file.

For example: "version": "${version}", should be in your fabric.mod.json file (note the “version” in curly brackets), but you may have accidentally input something like “0.0.1” instead: "version": "${0.0.1}":

This will cause java.math.BigDecimal to read the part after the initial “0” as [0.1].
The solution would just be to leave whatever was originally in "version" alone like this:
"version": "${version}",