Skip to content

deps: bump Chaquopy 16.1.0 → 17.0.0 for Gradle 9 compat#643

Merged
torlando-tech merged 2 commits intomainfrom
chore/bump-chaquopy-17
Mar 10, 2026
Merged

deps: bump Chaquopy 16.1.0 → 17.0.0 for Gradle 9 compat#643
torlando-tech merged 2 commits intomainfrom
chore/bump-chaquopy-17

Conversation

@torlando-tech
Copy link
Copy Markdown
Owner

Summary

  • Bumps Chaquopy from 16.1.0 to 17.0.0, eliminating all Gradle 9 deprecation warnings
  • Both warnings (VersionNumber type and Mutating buildscript configurations) were upstream Chaquopy issues, fixed in 17.0.0
  • Verified: all pip git dependencies (rns, lxmf, ble-reticulum) install cleanly, cryptography 42.0.8 wheels available

Chaquopy 17.0.0 breaking change audit

Change Impact
Python 3.8/3.9 dropped Safe — we use 3.11
AGP 7.0–7.2 dropped Safe — we use 8.13.0
Pip defaults to --only-binary Safe — verified all git deps still build wheels
buildPython must match app Python Safe — our auto-detect prefers 3.11

One remaining deprecation (Task.project at execution time) is a Gradle 10 warning, also from Chaquopy — not a blocker for the Gradle 9 upgrade path.

Closes #640

Test plan

  • Clean build succeeds (compileNoSentryDebugKotlin, compileDebugKotlin)
  • Zero Gradle 9 deprecation warnings with --warning-mode all
  • All Chaquopy pip dependencies install (rns, lxmf, ble-reticulum, cryptography, u-msgpack-python)
  • CI passes

🤖 Generated with Claude Code

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR bumps the Chaquopy Gradle plugin from 16.1.0 to 17.0.0 to eliminate Gradle 9 deprecation warnings, with a single line changed in the root build.gradle.kts. The author has audited all 17.0.0 breaking changes (Python 3.8/3.9 removal, AGP 7.x removal, --only-binary pip default, stricter buildPython matching) and verified they are safe given the project's configuration (Python 3.11, AGP 8.13.0, pure-Python/wheeled pip dependencies).

Key points:

  • The version bump itself is clean and minimal.
  • The --only-binary pip default is safe: rns, lxmf, and ble-reticulum are pure-Python and build wheels from their git+ URLs; cryptography ships pre-built wheels for Android.
  • The new strict buildPython ≡ app Python requirement in 17.0.0 is the one area that could catch contributors off guard. A pre-existing comment in app/build.gradle.kts (// Re-enable when Python 3.11 is available) hints that some environments may lack Python 3.11, which would now be a hard build failure rather than a warning. Explicitly pinning or documenting the buildPython requirement would harden onboarding.

Confidence Score: 4/5

  • Safe to merge; the change is a well-audited single-line version bump with no runtime risk to app behavior.
  • The diff is a single line, all 17.0.0 breaking changes are accounted for in the PR description, and the test plan confirms a clean build. A minor ergonomics risk exists for contributors without Python 3.11 due to the new strict buildPython requirement, but this does not affect production correctness.
  • No files require special attention for correctness; app/build.gradle.kts (not in diff) has the pre-existing pyc.src = false comment that is worth revisiting once Python 3.11 is pinned in all environments.

Important Files Changed

Filename Overview
build.gradle.kts Single-line version bump of Chaquopy plugin from 16.1.0 to 17.0.0; all AGP/Python version breaking changes are addressed, but the new strict buildPython matching requirement is not explicitly handled in existing chaquopy blocks.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Gradle build starts"] --> B["Chaquopy 17.0.0 plugin resolves"]
    B --> C{"buildPython\nauto-detect"}
    C -->|"python3.11 found on PATH"| D["buildPython = 3.11 ✓\nmatches app version = 3.11"]
    C -->|"only python3.12+\nor python3.14 found"| E["❌ Build fails\nbuildPython ≠ app Python\n(new hard error in 17.0.0)"]
    D --> F["pip install --only-binary :all:"]
    F --> G["rns @ git+...\n(pure Python → wheel built OK)"]
    F --> H["lxmf @ git+...\n(pure Python → wheel built OK)"]
    F --> I["ble-reticulum @ git+...\n(pure Python → wheel built OK)"]
    F --> J["cryptography>=42.0.0\n(pre-built Android wheel)"]
    F --> K["u-msgpack-python\n(pure Python → wheel built OK)"]
    G & H & I & J & K --> L["APK packaged with\nPython 3.11 runtime"]
Loading

Last reviewed commit: 65553bd

id("com.google.dagger.hilt.android") version "2.57.2" apply false
id("com.google.devtools.ksp") version "2.3.6" apply false
id("com.chaquo.python") version "16.1.0" apply false
id("com.chaquo.python") version "17.0.0" apply false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildPython version mismatch risk for contributors

Chaquopy 17.0.0 introduces a hard requirement: buildPython must exactly match the app's configured Python version (3.11). The pre-existing comment in app/build.gradle.kts (line 369–370) is a tell:

pyc {
    // Temporarily disable for local builds with Python 3.14+
    // Re-enable when Python 3.11 is available or Chaquopy supports 3.14
    src = false
}

The phrase "when Python 3.11 is available" implies certain developer/contributor environments do not have Python 3.11 installed. Under Chaquopy 16.1.0, a mismatched buildPython (e.g., 3.14) would proceed with a warning; under 17.0.0 it becomes a hard build failure.

To make the build robust for all contributors, consider adding an explicit buildPython or documenting the requirement:

// In app/build.gradle.kts or reticulum/build.gradle.kts
chaquopy {
    defaultConfig {
        version = "3.11"
        // Chaquopy 17+ requires buildPython to match `version`.
        // Ensure python3.11 is on PATH (e.g. via pyenv or system package manager).
    }
}

This doesn't block the merge if CI has Python 3.11 pinned, but without documenting or enforcing it, first-time contributors who only have Python 3.12+ installed will hit a cryptic Chaquopy error rather than a clear message.

Prompt To Fix With AI
This is a comment left during a code review.
Path: build.gradle.kts
Line: 9

Comment:
**`buildPython` version mismatch risk for contributors**

Chaquopy 17.0.0 introduces a hard requirement: `buildPython` must exactly match the app's configured Python version (`3.11`). The pre-existing comment in `app/build.gradle.kts` (line 369–370) is a tell:

```kotlin
pyc {
    // Temporarily disable for local builds with Python 3.14+
    // Re-enable when Python 3.11 is available or Chaquopy supports 3.14
    src = false
}
```

The phrase "when Python 3.11 is available" implies certain developer/contributor environments do **not** have Python 3.11 installed. Under Chaquopy 16.1.0, a mismatched `buildPython` (e.g., 3.14) would proceed with a warning; under 17.0.0 it becomes a hard build failure.

To make the build robust for all contributors, consider adding an explicit `buildPython` or documenting the requirement:

```kotlin
// In app/build.gradle.kts or reticulum/build.gradle.kts
chaquopy {
    defaultConfig {
        version = "3.11"
        // Chaquopy 17+ requires buildPython to match `version`.
        // Ensure python3.11 is on PATH (e.g. via pyenv or system package manager).
    }
}
```

This doesn't block the merge if CI has Python 3.11 pinned, but without documenting or enforcing it, first-time contributors who only have Python 3.12+ installed will hit a cryptic Chaquopy error rather than a clear message.

How can I resolve this? If you propose a fix, please make it concise.

Resolves all Gradle 9 deprecation warnings emitted during build:
- org.gradle.util.VersionNumber (used in PythonPlugin.checkAgpVersion)
- Mutating buildscript configurations (used in PythonPlugin.addDependency)

Both were upstream issues in Chaquopy 16.x, fixed in 17.0.0.

Closes #640

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@torlando-tech torlando-tech force-pushed the chore/bump-chaquopy-17 branch from 65553bd to 71db0eb Compare March 10, 2026 01:30
Chaquopy 17 requires buildPython to match the app's Python version.
Set buildPython("python3.11") explicitly in both app and reticulum
modules so contributors without python3.11 get a clear error rather
than a cryptic mismatch failure.

Also removes the unused findCompatiblePython() function (listed
dropped 3.8/3.9 versions) and updates the stale pyc comment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown
Contributor

sentry bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@torlando-tech torlando-tech merged commit ca8b942 into main Mar 10, 2026
13 checks passed
@torlando-tech torlando-tech deleted the chore/bump-chaquopy-17 branch March 10, 2026 03:27
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.

Deprecated Gradle features were used in the Columba build, making it incompatible with Gradle 9.0.

1 participant