Skip to content

Modify Gradle Configurations to Use Pre-Compiled Script and Convention Plugins #35

Description

@philliplbryant

The Gradle User Manual strongly advocates for the use of convention plugins (commonly implemented as precompiled script plugins) rather than relying on the older allprojects {} and subprojects {} blocks for managing shared build logic.

The primary challenge lies in the current use of the subprojects {} block in the root project, which applies the java plugin. This approach conflicts with the ability to utilize a platform module for importing dependency constraints from a BOM (Bill of Materials). By adopting a BOM, dependency management is significantly simplified as it centralizes version definitions, ensures library compatibility, and prevents version conflicts across modules.

Furthermore, using allprojects {} and subprojects {} introduces additional complexity, as configurations applied globally to all submodules often need to be selectively negated for modules where they are not applicable (e.g. the demos module). This approach not only increases the likelihood of errors but also undermines intuitive and maintainable build configuration practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions