class org.codehaus.groovy.ast.expr.TupleExpression cannot be cast to class org.codehaus.groovy.ast.expr.ArgumentListExpression (org.codehaus.groovy.ast.expr.TupleExpression and org.codehaus.groovy.ast.expr.ArgumentListExpression are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @36aa7bc2)
class org.codehaus.groovy.ast.expr.TupleExpression cannot be cast to class org.codehaus.groovy.ast.expr.ArgumentListExpression (org.codehaus.groovy.ast.expr.TupleExpression and org.codehaus.groovy.ast.expr.ArgumentListExpression are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @36aa7bc2)
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Gradle process the plugins { ... } block specially to make sure you do only use the restricted syntax it allows.
Unfortunately, this treatment has a bug and it chokes if it sees the apply plugin: '...' lines and aborts with that error.
That bug is still in 8.1.1, so you should report it.
To fix your build, move these lines outside the plugins { ... } block or even better don’t use that legacy way to apply plugins, but define the plugin repositories properly in your settings script and apply plugin by ID and version in your plugins { ... } block, or even better using a version catalog.
define the plugin repositories properly in your settings script and apply plugin by ID and version in your plugins { ... } block, or even better using a version catalog.
sorry, have no idea how to do this
move these lines outside the plugins { ... } block
now I have another error:
Build file 'C:\Users\istavi\Desktop\forge-1.18.2-40.2.0-mdk\build.gradle' line: 1
Could not compile build file 'C:\Users\istavi\Desktop\forge-1.18.2-40.2.0-mdk\build.gradle'.
> startup failed:
build file 'C:\Users\istavi\Desktop\forge-1.18.2-40.2.0-mdk\build.gradle': 1: Only Settings scripts can contain a pluginManagement {} block.
Well, the error is quite meaningful, isn’t it?
It says “Only Settings scripts can contain a pluginManagement {} block.”, I’m unsure what to add to that.