I am currently attempting to determine the feasibility of making a particular kind of Minecraft mod using the Forge modding framework. One of the peculiarities of this framework is that it requires a custom Gradle plugin to build the mods (for various copyright-related reasons, given that Minecraft is not FOSS), but this Gradle plugin only works with ancient versions of Gradle. Furthermore, I want to be able to target multiple Minecraft versions in the same code base (essentially, keeping as much common code as possible in shared java library projects), but that requires that I have two sub-projects with different versions of ForgeGradle (Forge's Gradle plugin), and of course those versions require different Gradle versions. I also prefer to use the newest Gradle for the non-Forge parts of this project, which is, of course, incompatible with ForgeGradle. As such, I ask, how can I have different versions of Gradle for different sub-projects in a multi-project Gradle project? If this isn't possible, how can I automate the connection between these projects in an IDE-friendly and single-git-repository-friendly way (mainly IntelliJ Idea Community Edition)? I intend for the versions of the repository to be tracked as a single unit, hence the need for them to be in the same git repo.
Gradle does not support multiple Gradle versions in the same multi project build. This is also not supported in composite builds.
Given the constraints, the easiest solution would be to work with a local repository to which you publish and from which you fetch your cross project dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With