Gradle game modding system?

I’ve been working on a game that’s all about modding. It’ll be in LibGDX so it doesn’t take long to make and all. I’ve been thinking of multiplayer and the complications that come with it. With a game that’s centralized around mods, how will you work with things like library repositories being synced with the game server. So my plan was to have a gradle repo on the server and a gradle repo on the client. Any time you log into the server it downloads the updated dependencies and fixes up your client. If the build fails, it recommends removing mods, and never crashes.

The entirety of the game will have it’s mods in gradle then download dependencies before logging into a server. This way the game’s source is synced with the server’s. Would this work, or is shipping the JDK with your game crazy xD