See build.gradle.kts and settings.gradle.kts for the buildscript. When in doubt, refer to the javadocs on RFG classes (you should be able to navigate to them in IntelliJ while working on the gradle scripts) and the Gradle User Guide.
Linux: ./gradlew setupDecompWorkspace
Windows: ./gradlew.bat setupDecompWorkspace
Make sure to refresh the IDE Gradle model after setting up the workspace for the first time, otherwise it might not find the Minecraft and Forge classes.
Linux: ./gradlew build
Windows: ./gradlew.bat build
Linux: ./gradlew runClient
Windows: ./gradlew.bat runClient
Optional arguments:
./gradlew runClient [--debug-jvm] [--args minecraft arguments] [--username MyUser] [--uuid Overwrite-uuid]
Linux: ./gradlew runServer
Windows: ./gradlew.bat runServer
Optional arguments:
./gradlew runServer [--debug-jvm] [--args nogui]
Local:
Linux: ./gradlew publishToMavenLocal
Windows: ./gradlew.bat publishToMavenLocal
Remote:
Linux: ./gradlew publish
Windows: ./gradlew.bat publish