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

Well first off, shipping a JDK with your game isn’t crazy. Lots of developers are doing it now, I’d say it’s definitely something to look into.

Regarding your Gradle stuff, what I would do is have your Gradle build file actually download and execute another build file that is stored on the server (and is updated by a human, or whoever dictates which mods belong on which server). Basically you can tell Gradle to download a build file from a server and execute it, obviously this downloaded file would contain all the mods (or dependencies if we are going to use correct terminology!). I’m not extremely fluent in Gradle, but AFAIK if a build fails then I think it will keep the last successful build. So that would solve your “never crashing” problem.

Don’t most people just ship the JRE? Because the JDK is much larger?
Also should I ship the OpenJDK or is there one specifically made to be distributed?

Oh, I figured you just meant the JRE! I’ve never done it so I wouldn’t be the one to ask, hopefully someone else comes along with more information. I would ship it with OpenJDK (or JRE) solely because Oracle is an ass, but of course you should only ship the implementation you developed the game on.

You might take a look at Zulu builds, they claim that it is completely free to distribute. Take a look at that page:

I haven’t used it myself, but it looks a better choice, as it is built on OpenJDK.

I’d need the JDK to compile sources and all, and OpenJDK is using the GPL2 license, so commercial use is possible. I’ve gotta provide the source code for the OpenJDK with the download though ;(

Why would you need to provide the source code for OpenJDK? As far as I can tell you only have to provide a link to get the source for OpenJDK, you don’t actually have to include it in your package. Someone correct me if I’m wrong!

Do you really need the JDK, or just javac? It’s possible to rip out just the bits of the JDK you need. I actually ship a refactored version of javac inside Praxis LIVE - https://github.com/praxis-live/compiler-javac7