After a build you see: 'Deprecated Gradle features were used in this build, making it incompatible with Gradle N.' What does this tell you and what should you do?
answer
- printed by default summary mode
- build succeeded now, breaks on Gradle N
- re-run with all (+ stacktrace) to expand
- fix DSL or upgrade plugin
- lock with fail once clean
basics
~20 sIt means your build used something that will be removed in the next major Gradle (version N), so it would break after upgrading. Re-run with --warning-mode all to see the specific deprecations, then fix them.
solid answer
~40 sThat line is what the **default `summary` warning mode** prints: at least one deprecated feature was used, and as a result the build is not compatible with the next major version, `N`. It's a heads-up, not a failure — the build still succeeded on your current Gradle. The actionable step is to switch to `--warning-mode all` (optionally with `--stacktrace`) to expand the summary into the individual warnings and their origins, fix each (often by upgrading a plugin or rewriting a deprecated DSL call), and re-run until the summary line disappears. If you want the build to refuse to succeed while any deprecation exists, use `--warning-mode fail`. Ignoring the line means your eventual upgrade to Gradle `N` will break.
code
bash · 2 lines# Turn the one-line summary into the actual list of deprecations
./gradlew build --warning-mode all --stacktracego deeper
Recognize the line as the default summary heads-up about the next major and know to re-run with all.
Expand with all --stacktrace, fix DSL vs plugin offenders, and re-run until clean.
Drive it to zero and lock with fail; explain the deprecate-then-remove-at-major lifecycle behind the message.
Use the message as the trigger for an upgrade-readiness audit and standardize the clean-then-ratchet process across teams.
## Decoding the message Gradle's default mode is `summary`. Rather than spamming every warning, it collapses them into one closing line: *"Deprecated Gradle features were used in this build, making it incompatible with Gradle N."* Two facts are packed in: 1. **Something deprecated was used** — at least one API/DSL/behaviour on the removal track was exercised. 2. **The future-incompatible target is N** — the next major version where those features are removed. Your build works *now* but would break on `N`. It is informational; the build did not fail (unless you set `fail`). ## What to do ```bash # Expand the summary into the actual offenders and where they come from ./gradlew <task> --warning-mode all --stacktrace ``` Now each deprecation is printed individually with its message and, thanks to `--stacktrace`, its origin. Work through them: - **Your DSL** — rewrite the call to the recommended replacement named in the message. - **A plugin** — the stack trace points at the plugin package; upgrade that plugin to a version that doesn't use the deprecated API. Re-run until the summary line is gone, which means the build is clean and ready for the `N` upgrade. ## Locking it in Once clean, set `org.gradle.warning.mode=fail` so the summary line can never come back unnoticed: any reintroduced deprecation fails the build instead of printing a quiet count. ## Common misread The message is not saying the build *failed* or that you're already on an incompatible Gradle. You're fine today; the warning is about the *next* major. Treating it as noise is exactly how deprecation debt accumulates.
- Does this message mean the build failed?No. Under the default `summary` mode the build still succeeds; it's an advisory that the build won't be compatible with the next major Gradle. Only `--warning-mode fail` turns deprecations into a failure.
- The summary doesn't list which features were deprecated. How do you find them?Re-run with `--warning-mode all` (and `--stacktrace` for origins) to expand the count into the individual warnings.
saying these in an interview costs you the question
- Interpreting the summary line as a build failure.
- Thinking you're already on the incompatible version rather than being warned about the next major.
- Ignoring the line as harmless noise.