If I’m not mistaken, that’s explained in the 4th item at Questions on V2 plugin descriptor - #3 by nik
You either create an empty module with “loading=embedded” and then declare a dependency on it.
Or (if you feel rested) setup your Gradle build to inline the dependency into the module jar at lib/my.module.jar. That’s what I did, but only because I had to make my own Gradle plugin for my LSP client library.