Think I've actually got this working by adding error-prone as a dependency:
dependencies {
minecraft "net.minecraftforge:forge:${config.mc_version}-${config.forge_version}"
provided "com.google.errorprone:error_prone_annotations:2.1.0"
}
Looking back, I had that in 1.12.2 as well, but commented it out. Not sure why I need it, since it seems non-standard, but Minecraft starts up with that in place, at least.
Of course, it crashes with an NPE very quickly but that's my incomplete porting and within my power to fix