Skip to content

docs(plugins): call hasProperty() on rootProject in the 9.0 plugin guide - #642

Merged
andredestro merged 1 commit into
mainfrom
docs/RMET-5591/gradle-root-project-lookup
Nov 20, 2026
Merged

andredestro merged 1 commit into
mainfrom
docs/RMET-5591/gradle-root-project-lookup

Conversation

@andredestro

Copy link
Copy Markdown
Contributor

Description

Adds a "Call hasProperty() on rootProject" section to the plugin upgrade guide (updating/plugins/9-0.md).

On Gradle 9.8, a plugin's project.hasProperty('x') ? rootProject.ext.x : default lookups only find x by falling back to the app's root project. Gradle deprecated that ("Implicit lookup of properties in parent projects ... will fail with an error in Gradle 10"), so apps get a warning per variable for every plugin that still uses that form. The section shows the warning and the one-word change.

The existing snippets in the guide (plugin variables, compileSdk / minSdkVersion, kotlin_version) now use the rootProject form, so they match a file where this step is already done and still show only the version changes.

The same change is in Capacitor, the official plugins, the plugin template and the migration tool: ionic-team/capacitor#8731, ionic-team/capacitor-plugins#2640, ionic-team/create-capacitor-plugin#157, ionic-team/migrate-capacitor-plugin#51.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation
  • Other (CI, chores, etc.)

Rationale / Problems Fixed

https://outsystemsrd.atlassian.net/browse/RMET-5591
https://docs.gradle.org/9.8.2/userguide/upgrading_version_9.html#deprecated_implicit_lookup_in_parent_projects

Notes / Comments

prettier --check already reports this file on main, so I left the formatting as it was.

Gradle 9 deprecates project.hasProperty() finding a property that is only
declared on the root project, and Gradle 10 will turn it into an error.
Add a section with the change and use the rootProject form in the existing
build.gradle snippets.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
capacitor-docs Ready Ready Preview Nov 19, 2026 5:33pm UTC

Request Review

@andredestro
andredestro merged commit 3d05432 into main Nov 20, 2026
2 checks passed
@andredestro
andredestro deleted the docs/RMET-5591/gradle-root-project-lookup branch November 20, 2026 15:14

This branch was successfully deployed

1 active deployment
Preview — eddd4e28 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants