Open Frontrider opened 5 years ago
If we did autojson at compiletime, we'd probably need to write a Gradle plugin, so it'd work with all IDEs. With runtime, we could also put all the boilerplate code in the autojson lib, yeah?
We don't need a gradle plugin. You add the dependency as a processor
. For the "runtime" version you need at least a script plugin.
You need a plugin, if you don't want to leave this stuff in the mod after release.
After tackling the problem, I reached the following conclusion: I did some annotation processing in the past, but this task was a bit different from that. I'll open a few more issues on exact details later. (it's 2am when I'm writing it)
I came up with the following versions: Runtime: We write a lib that pulls in minecraft, and the mod than processes all the blocks, in a similar way that we see now. Seems easier to create, but might can easily end up being harder to use. pros:
cons:
Compile time: With this approach, we'll have a bit harder time at first, because we need more metadata. But, it's more powerfull than runtime generation, because we can roam more freely in the code. pros:
cons: