Entire Build/Standalone Project

In Short

  • Each included project:
    • Has its own settings.gradle.kts (settings.gradle.kts) and build.gradle.kts.
    • Has its own lifecycle, versioning, dependencies, and configuration.

GPT Response

In Gradle, a composite build is a build setup that allows multiple independent Gradle builds to be combined and work together. When you include an "entire build" in a composite build, it means that instead of breaking a project into sub-projects under one unified build, you are combining separate, independent builds. Each of these builds typically has its own settings.gradle.kts, build.gradle.kts, and its own lifecycle, versioning, dependencies, and configuration.

In contrast, in a multi-project build, all sub-projects share the same build lifecycle and configuration defined by the root project’s settings.

Key Differences:

  • Multi-project build: Sub-projects are included in a single, unified build managed by the root project.
  • Composite build: Entire independent builds (including their configurations and dependencies) are combined and linked together, allowing them to interact without merging them into a single build.

When to Use a Composite Build:

  • You have independent projects that need to work together (for example, different services or libraries that have their own lifecycle but need to be tested or built together).
  • You want to keep independent versioning and releases for projects but still benefit from Gradle’s ability to share outputs and dependencies across builds.

This feature is useful in large-scale environments where multiple teams might maintain different parts of a system or different libraries, but need to integrate them for a specific build or deployment without tightly coupling them as sub-projects.


Backlinks