Hi, just starting out with Gradle. I’m trying to have a nested composite build. Basically, I want to satisfy this scenario:
- Monorepo of microservices with each folder can be a module (
dependent-2), library (
dependency-1), plugin (
- We don’t want to publish library / plugin to a repository, keep everything local
- Each module can depend to a library / plugin, and can be worked on as individual projects.
- To satisfy points
3., each module is a composite build which include builds of library and plugin
- For scenarios where we want to refactor, we have the
compositefolder / project that includes all modules, library and plugin. We would just open the
compositeproject in IntelliJ, then proceed with refactoring shared codes.
But I’m encountering issues with point
5. Whenever I open a ‘parent’ composite project that includes: ‘child’ composite projects, library, and plugin, I can’t run a
test task for the plugin in IntelliJ. It results to an error:
FAILURE: Build failed with an exception. * Where: Build file '/composite-full/module-2/build.gradle.kts' line: 9 * What went wrong: Plugin [id: 'org.company.plugin.greeting'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (None of the included builds contain this plugin) - Plugin Repositories (plugin dependency must include a version number for this source)
I can run the
test task of a dependency, it doesn’t produce any error. It’s just for the plugins.
Here’s a build scan report: Build scan | Gradle Cloud Services
I’ve created a minimal repository that repoduces the issue: GitHub - aamiel16/gradle-composite.
Greatly appreciate any ideas / thoughts to handle this.