Plugins that configure the built-in plugins with saner defaults (to be documented).
Current goal is to make Android support better, because of build types and flavors.
For details on what was changed in different versions, see CHANGELOG.
Android Gradle Plugin 3.1.4 — 8.6.1 on Gradle 4.9 — 8.8 as listed in AGP's compatibility guide are covered by different plugin versions.
Currently supported version are Android Gradle Plugin 7.0.2 — 8.6.1 on Gradle 7.0 — 8.7 where compatible.
AGP → Gradle ↓ |
3.1.x | 3.2.x | 3.3.x | 3.4.x | 3.5.x | 3.6.x | 4.0.x | 4.1.x | 4.2.x ^3 | 7.0.x | 7.1.x | 7.2.x | 7.3.x | 7.4.x | 8.0.x | 8.1.x | 8.2.x | 8.3.x | 8.4.x |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4.4 - 4.8.1 | 0.5 - 0.7 | ^1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
4.9 - 4.10 | 0.8 - 0.14 | 0.7 - 0.14 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
4.10.1 - 5.1 | ❓ | 0.8 - 0.14 | 0.8 - 0.14 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
5.1.1 - 5.4 | ❓ | ❓ | 0.9 - 0.14 | 0.9 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
5.4.1 - 5.6.3 | ❓ | ❓ | 0.9 - 0.15.1 | 0.9 - 0.15.1 | sup. | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
5.6.4 | ❓ | ❓ | ❓ | ❓ | 0.10 - 0.15.1 | 0.10 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
6.0 - 6.1 | ❓ | ❓ | ❓ | ❓ | 0.11 - 0.15.1 | 0.11 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
6.1.1 - 6.4.1 | ❓ | ❓ | ❓ | ❓ | 0.11 - 0.15.1 | 0.11 - 0.15.1 | 0.11 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
6.5 - 6.7 | ❓ | ❓ | ❓ | ❓ | 0.11 - 0.15.1 | 0.11 - 0.15.1 | 0.11 - 0.15.1 | 0.11 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
6.7.1 - 6.9.4 ^3 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.11 - 0.15.1 | 0.11 - 0.15.1 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.0 - 7.1.2 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.13 - 0.15.1 | 0.13 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.2 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.13 - 0.15.1 | 0.13 - ∞ | 0.14 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.3 - 7.3.3 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.13 - 0.15.1 | 0.13 - ∞ | 0.14 - ∞ | 0.14 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.4 - 7.4.2 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.14 - 0.15.1 | 0.14 - ∞ | 0.14 - ∞ | 0.14 - ∞ | 0.15 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.5 - 7.5.1 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.14 - 0.15.1 | 0.14 - ∞ | 0.14 - ∞ | 0.14 - ∞ | 0.15 - ∞ | 0.15 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ |
7.6 - 7.6.1 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.14 - 0.15.1 | 0.14 - ∞ | 0.14 - ∞ | 0.14 - ∞ | 0.15 - ∞ | 0.15 - ∞ | ❌ | ❌ | ❌ | ❌ | ❌ |
8.0 - 8.2 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.15 - ∞ | 0.16 - ∞ | 0.16 - ∞ | ❌ | ❌ | ❌ |
8.3 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | ❌ | ❌ |
8.4 - 8.5 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | ❌ |
8.6 - 8.7 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ | 0.17 - ∞ |
There are different ways to use a Gradle plugin, choose your poison below.
plugins
)buildscript
)For more, see the examples folder.
There's a built-in HTML report that gathers all the results from all the modules into a single HTML file.
gradlew :violationReportHtml
There's a built-in console report that gathers all the results from all the modules and outputs results to the console.
gradlew :violationReportConsole
It just saves the number of violations into a file. Good for automation.
gradlew :violationCountFile
It just fails if there are violations.
gradlew :validateViolations
Gathers results from submodules and fails if there were errors.
gradlew :testReport
Note: this changes the :*:test
test tasks to not fail so a whole project encompassing report can be generated.
:lint
taskDepends on all the other lints and shows a summary of failures to reduce the need to scroll/scan the build logs.
If invoked explicitly as gradlew :lint
it'll fail, otherwise (e.g. gradlew lint
) it just silently adds itself to the list of lint
tasks along with the others and prints the summary at the end.
To disable:
afterEvaluate { tasks.named("lint").configure { it.enabled = false } }
See development.md on how to set this project up.