Task 'setupDecompWorkspace' not found in root project 'Testing'

For some reason, after creating a project, gradlew doesn’t recognize most of the tasks that I’m supposed to execute, according to several threads I’ve found.

I believe I have done everything according to the documentation. I’m using Eclipse, so I created a new Gradle project, and then replaced the contents of build.gradle with the contents found here:

https://docs.spongepowered.org/stable/en/plugin/project/gradle.html

After that I’ve run gradlew build, and ran “Refresh Gradle Project” in Eclipse. But even after doing this, I get the errors “Task ‘setupDecompWorkspace’ not found in root project ‘Testing’.”. The same goes if I run commands like gradlew downloadServer or gradlew setupDecompWorkspace --refresh-dependencies. The only commands that work are gradlew build and gradlew eclipse.

How do I go about solving this when gradlew commands for the most part give me that error message?

Out of curiosity what gradle version and JDK and JRE you got?

I’m not sure but as I remember, setupDecomWorkspace which created by ForgeGradle
Maybe you can try to add this on the top of build.gradle

buildscript {
    repositories {
        maven {
            name = 'forge'
            url = 'https://files.minecraftforge.net/maven'
        }
    }

    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}

And add this after plugins

apply plugin: 'net.minecraftforge.gradle.forge'   

Then refresh the project.