Self-contained, non-executable fat jar for the Plugin Portal

I’m writing a Gradle plugin that helps to automate a piece of legacy software, and interacting with it requires the use of a bunch of JAR files that aren’t available publically. I would like to include those JARs in the Plugin JAR I publish.

I added those JARs to a private Maven repo and used Shadow to build an Uber JAR. I mistakenly thought that the plugin would be “self-contained”, and Gradle wouldn’t try to find those dependencies via repositories{} because they are included in the JAR file. But that is not the behavior.

I realize this is an edge case… but is it possible to “rewrite” the dependencies in the JAR so that Gradle looks inside the JAR instead of out to repositories{} for those dependencies?