CurseGradle is a Gradle plugin that lets you publish artifacts to CurseForge. Consult the CurseGradle wiki for the full details. It works out of the box for ForgeGradle projects, but requires a bit of configuration for Fabric projects, which is the subject of this gist.
CurseGradle will assume the environment is a ForgeGradle environment, so its integration has to be manually switched off.
Without ForgeGradle, CurseGradle doesn't know which Minecraft version you are working with, so it has to be specified manually.
The correct main artifact is the output of the remapJar
task.