Best Practices Index
The table below provides a complete list of documented Gradle Best Practices.
Use this as a quick reference to track newly added recommendations, check adoption status, or explore areas for improving your build:
| Title | Section | Added in Gradle Version |
|---|---|---|
General |
8.14 |
|
General |
8.14 |
|
General |
8.14 |
|
General |
9.4.0 |
|
General |
8.14 |
|
General |
9.0.0 |
|
General |
9.2.0 |
|
General |
9.2.0 |
|
General |
9.6.0 |
|
General |
9.7.0 |
|
Obtain Loggers via |
General |
9.8.0 |
Structuring Builds |
9.0.0 |
|
Structuring Builds |
9.0.0 |
|
Structuring Builds |
9.0.0 |
|
Structuring Builds |
9.1.0 |
|
Structuring Builds |
9.3.0 |
|
Dependencies |
9.0.0 |
|
Dependencies |
9.0.0 |
|
Dependencies |
9.0.0 |
|
Dependencies |
9.0.0 |
|
Dependencies |
9.0.0 |
|
Declare Dependencies using a single GAV ( |
Dependencies |
8.14 |
Dependencies |
9.1.0 |
|
Dependencies |
9.2.0 |
|
Always Declare Attributes on Consumable and Resolvable Configurations |
Dependencies |
9.7.0 |
Tasks |
8.14 |
|
Favor |
Tasks |
8.14 |
Tasks |
9.1.0 |
|
Tasks |
9.0.0 |
|
Tasks |
9.1.0 |
|
Tasks |
9.1.0 |
|
Use |
Tasks |
9.2.0 |
Tasks |
9.3.0 |
|
Don’t hardcode Task names unless they are documented as Public API |
Tasks |
9.7.0 |
Tasks |
9.7.0 |
|
Tasks |
9.7.0 |
|
Favor collection property types over a |
Tasks |
9.8.0 |
Performance |
9.4.0 |
|
Performance |
9.0.0 |
|
Performance |
9.1.0 |
|
Performance |
9.1.0 |
|
Performance |
9.0.0 |
|
Security |
9.1.0 |
|
Security |
9.3.0 |
|
Security |
9.7.0 |
|
Security |
9.7.0 |
|
Security |
9.8.0 |
|
Testing |
9.4.0 |