Gradle: Nested project structure and git submodule setup

36 views Asked by At

I have a project structure set up for a Minecraft mod project. The layout is multiple gradle-backed projects, arranged as so:

root
  ├- core (git submodule)
  | ├- core
  | | └- build.gradle.kts
  | |
  | ├- core-api
  | | └- build.gradle.kts
  | |
  | ├- room-api
  | | └- build.gradle.kts
  | |
  | ├- room-upgrade-api
  | | └- build.gradle.kts
  | |
  | └- settings.gradle.kts
  |
  ├- main
  | └- build.gradle.kts
  |
  ├- datagen
  | └- build.gradle.kts
  |
  ├- settings.gradle.kts
  └- build.gradle.kts

Layout Details:

  • core comes from a git submodule and needs to be configured that it can stand alone, as the various API projects inside are built separately for other mods.
    • core, core-api, room-api, and room-upgrade-api are all at the same level under platform.
    • core is built atop all three API projects.
    • room-upgrade-api is built atop room-api.
  • main is the main source code, and must include all 4 platform projects.

The Problem: I cannot get core (in the submodule) to reference the project structure correctly, while included as a part of an actual modloader build tree. The relative projects seem to either not be found (during the neoforge builds) or need to be included at the root as includeBuild.

Reference: https://github.com/robotgryphon/CompactMachines/tree/1.20.x-WIP

0

There are 0 answers