A project I am working on, has lots of individual repositories that are independant gradle projects(“modules”) with function, for example “Analytics”, “Storage”, “Networking”, etc.
They all work independently via their gradle scripts, but they all depend on a common composite build called kmp-scripts which is the same in all the projects.
The structure is like this for each ‘module’
Where in the settings.gradle.kts we have
This all works fine individually, but because we have lots of individual modules, it would be nice to have a single project that couples everything together, so that when a change is made locally i can check easily by running a build on all the modules.
So i created a gradle project that has git submodules of all the modules.
The structure is like this
Where the settings.gradle.kts has the following
The problem is, because they all includeBuild kmp-scripts, i get the following error:
MegaProjectFolder/Analytics/kmp-scripts has build path :kmp-scripts which is the same as included build MegaProjectFolder/Storage/kmp-scripts
I tried a few alternative solutions, one which was to move the kmp-scripts folder into the root of the mega project but then my modules cannot find the plugin(kmp-scripts) are used as a plugin.
Sorry for essay, its a tricky one, and one i cannot easily make a public repo for. It has me stumped, as i thought when you add a project as a composite build, then it would be evaluated independantly.