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.
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 {}andsubprojects {}blocks for managing shared build logic.The primary challenge lies in the current use of the
subprojects {}block in the root project, which applies thejavaplugin. This approach conflicts with the ability to utilize aplatformmodule 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 {}andsubprojects {}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. thedemosmodule). This approach not only increases the likelihood of errors but also undermines intuitive and maintainable build configuration practices.