Skip to content

chore(deps): update gradle to v9.7.0 - #6589

Open
renovate[bot] wants to merge 5 commits into
mainfrom
renovate/gradle-9.x
Open

chore(deps): update gradle to v9.7.0#6589
renovate[bot] wants to merge 5 commits into
mainfrom
renovate/gradle-9.x

Conversation

@renovate

@renovate renovate Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Important

Hand-fixed — merge #6595 first. Gradle 9.7.0 was not a drop-in bump; this branch now carries three fix commits on top of Renovate's wrapper update, and includes the vendored secrets plugin from #6595 (this PR's diff shrinks to just the Gradle changes once that merges). Renovate will no longer auto-rebase this branch.

What 9.7.0 broke, and the fixes here

  1. --no-configuration-cache now hard-errors while Isolated Projects is enabled. Every invocation that disables the config cache (flatpak source generation, Dokka, baseline profile, verify-rb) now pairs it with --no-isolated-projects — 9 sites across workflows/scripts, plus the two docs that recommend the flag.
  2. Cross-project model access is now fatal. Four in-repo sites moved to the isolated.rootProject idiom (build-logic/convention spotless/detekt config, desktopApp proguard rules, feature:docs sync tasks). The org.meshtastic.flatpak.sources.settings plugin reads Gradle.extensions, which IP forbids — it is now applied behind -Pmeshtastic.flatpakSources=true, passed by the only jobs that need :captureFlatpakSources (which already run with IP off).
  3. Google's secrets-gradle-plugin reads through rootProject.file() — unfixable upstream (dormant since 2022, fix unreleased in Support Gradle Isolated Projects feature google/secrets-gradle-plugin#104); replaced by the vendored copy in build: vendor secrets-gradle-plugin with an Isolated-Projects fix #6595.
  4. Two CI invocations run third-party code that trips IP at execution time and now pass --no-isolated-projects (config cache stays on): the android-check assemble, where setup-gradle's dependency-graph plugin force-resolves via allprojects{}, and the screenshot validate task, where AGP's screenshot plugin iterates BuildServicesRegistry. Both reproduced and re-verified green locally on 9.7.0.
  5. CI's configuration-cache restore could cross Gradle versions. The cache key hashed the wrapper, but restore-keys fell back to any entry for the job — and a 9.6.1-era entry crashes 9.7's fingerprint deserialization outright (IsInIdeaSyncValueSource not found in class loader) instead of degrading to a CC miss; that's what killed lint-check and the three test shards. The wrapper hash is now its own restore-key segment, so restores never cross a version boundary and future Gradle bumps take one cold configuration instead of a red run.
  6. Flatpak lockstep pin: scripts/verify-flatpak/desktop-offline.yaml now points at the 9.7.0 distribution + sha256, matching gradle-wrapper.properties as its comment requires.

Testing Performed

On 9.7.0: detekt, assembleDebug, test, allTests, :screenshot-tests:validateDebugScreenshotTest, and the CI assemble invocation green locally (sole exception: the pre-existing BleAddressLoggingTest worktree-path quirk, unrelated and tracked separately); :captureFlatpakSources configures cleanly via the new opt-in. Everything also verified green on 9.6.1, so the fixes are safe even if this bump is deferred.


This PR contains the following updates:

Package Update Change
gradle (source) minor 9.6.19.7.0

Release Notes

gradle/gradle (gradle)

v9.7.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies Dependency update label Aug 6, 2026
@github-actions github-actions Bot added the chore label Aug 6, 2026
@renovate
renovate Bot force-pushed the renovate/gradle-9.x branch from 386ff76 to f4cf85b Compare August 8, 2026 14:23
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

Google's secrets-gradle-plugin 2.0.1 reads properties via
project.rootProject.file(), which Isolated Projects forbids — Gradle 9.7+
fails every androidApp build over it. Upstream is dormant (no release since
2022) and the one-line fix has sat unmerged in google/secrets-gradle-plugin#104
since March, so waiting is not a strategy and this blocks the Gradle 9.7 bump.

Vendor the plugin (Apache-2.0, ~180 lines) into build-logic as
meshtastic.android.secrets, byte-identical except:
- property files resolve via isolated.rootProject (the IP-safe idiom)
- legacy Variant API helpers dropped (classes removed in AGP 9; dead paths)
- buildConfigFields made null-safe (nullable since AGP 9)

The vendored files keep Google's license header and are excluded from
spotless/detekt so they stay diffable against upstream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
renovate Bot and others added 2 commits August 8, 2026 09:12
…-no-configuration-cache

Gradle 9.7.0 hard-errors with "Configuration Cache cannot be disabled when
Isolated Projects is enabled." Isolated Projects implies the configuration
cache, so every invocation that disables the cache must disable IP too.

Also bump the flatpak manifest's Gradle distribution in lockstep with
gradle-wrapper.properties — the sha256 there verifies that exact zip.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jamesarich
jamesarich force-pushed the renovate/gradle-9.x branch from f4cf85b to f5abce2 Compare August 8, 2026 16:25
@github-actions github-actions Bot added build Build system changes desktop Desktop target repo Repository maintenance labels Aug 8, 2026
@renovate

renovate Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@github-actions

This comment has been minimized.

Gradle 9.7.0 promotes Isolated Projects and now hard-errors on cross-project
model access that 9.6.1 tolerated. Four sites needed the isolated.rootProject
idiom already used everywhere else in build-logic:

- build-logic/convention: rootProject.file("../config/...") for spotless/detekt
- desktopApp: rootProject.file("config/proguard/shared-rules.pro")
- feature/docs: rootProject.layout for the docs/ sync tasks

The flatpak-sources settings plugin reads Gradle.extensions, which IP forbids;
since only :captureFlatpakSources needs it and every caller already disables IP,
it is now applied behind an opt-in property instead of on every build.

Two CI invocations run third-party code that trips IP at execution time and
now pass --no-isolated-projects (config cache stays on):
- android-check assemble: setup-gradle's dependency-graph plugin
  force-resolves via allprojects{}
- screenshot validate: AGP's screenshot plugin iterates BuildServicesRegistry

Verified on 9.7.0: detekt, assembleDebug, test, allTests, screenshot validate
and the CI assemble line all green locally (sole exception is the pre-existing
BleAddressLoggingTest worktree-path quirk), and the flatpak path configures
cleanly. All of it stays green on 9.6.1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jamesarich
jamesarich force-pushed the renovate/gradle-9.x branch from f5abce2 to c8dc72a Compare August 8, 2026 18:39
…sion

The CC cache key hashed the wrapper properties, but restore-keys fell back
to any entry for the job — including ones written by an older Gradle. A
stale same-version entry is a graceful CC miss; a cross-version entry can
crash fingerprint deserialization outright, which is exactly how 9.6.1
entries killed lint-check and all three test shards under 9.7.0
("Class 'IsInIdeaSyncValueSource' not found in class loader").

Give the wrapper hash its own key segment and include it in the restore
prefix, so restores never cross a Gradle version boundary. Future Gradle
bumps take one cold configuration instead of a red run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system changes chore dependencies Dependency update desktop Desktop target repo Repository maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant