ryanhaney97 / forge-clj

A WIP implementation of clojure for minecraft forge.
60 stars 7 forks source link

Leiningen Plugin to Replace Forge Gradle #28

Open ryanhaney97 opened 8 years ago

ryanhaney97 commented 8 years ago

This is something I would LIKE to get around to and would LIKE to have, but unfortunately reverse-engineering Forge Gradle for use in Leiningen would take too much time for me to do. Especially since I have no experience at all with writing Leiningen Plugins, which, while I still COULD do it, it would take much more time to do so.

So, if anyone would like to do this, I would be happy to hand off the task to someone else. The features that NEED to be implemented are the ability to start a new workspace (in other words, the setupDecompWorkspace Gradle task), and the ability to actually compile the project (the Gradle build task). If you want my suggestion for a name and you actually care, I would recommend calling it "leincraft".

ryanhaney97 commented 8 years ago

@PythonJedi mentioned taking this up, and whether they should pop it in a separate repository. Answer is that yes, this should be put in a separate repository from forge-clj. Not sure why that comment isn't here, they probably deleted it, but I wanted to clarify that anyways.

Another thing I'd like to note is that boot is an acceptable alternative if that's your thing, and might very well be better suited for this task.

PythonJedi commented 8 years ago

I was in a bit of a fit of madness when I thought I could actually withstand the insanity that is minecraft modding. I'd love to see it properly clojure-fied, but I'm just not the person to handle the port. Best of luck!

Immortalin commented 8 years ago

Here's a quick summary of what is needed to be done, republished with permission from the forge developer who explained this:

1) download MC jars 2) merge MC jars 3) apply Exceptor to MCP jars (using exceptor json and merged.exc file) 4) deobfuscating the MC jar to SRG names using Special Source and the SRg files 5) decompile MC 6) run a bunch fo source transformations, including an enum fixer, the FML local variable name fixer, and the ZGL constants replacer 7)remap the source fileas from SRG names to MCP names 8) recompile the sources into a jar 9) provide the jar as a compil-time dependency and well.. all the convenience and configuration and stuff that goes with making all that happen.. thats also just the decomp workspace side of it, doesnt inclduee the dev and CI workspaces as those use binary patches.. If you are setting up forge... youl need to add step 6.5 which is apply the forge/fml patches

Courtesy of Abrar Syed

ryanhaney97 commented 8 years ago

@Immortalin Yes, this is basically what needs to be done. Certainly a lot of steps and time.

Just mentioning, I PROBABLY won't be doing this myself (unless I manage to get everything for forge-clj done, AND completely updated, with nothing left to do, which is unlikely). Gradle is annoying but is still usable, and there are plenty of things to do on the API side of things. A leiningen plugin would make everything way better and more manageable though.

Also, something I found a bit useful when I tried doing this (I only got like 1 task done), was to look at the Gradle tasks performed when using certain commands, and matching them with what Forge Gradle is doing in the source code. I COULD post what little I wrote if you want, but it's only for the first step of setting up forge (the getRemoteJson task, and not exactly complete either), and could definitely be refactored, as I know nothing about leiningen plugin development.

If anyone does want to take up this monumental task, say so and I'll assign it. I don't plan on working on it any time soon.