deps: bump Chaquopy 16.1.0 → 17.0.0 for Gradle 9 compat#643
deps: bump Chaquopy 16.1.0 → 17.0.0 for Gradle 9 compat#643torlando-tech merged 2 commits intomainfrom
Conversation
Greptile SummaryThis 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 Key points:
Confidence Score: 4/5
Important Files Changed
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"]
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 |
There was a problem hiding this 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:
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>
65553bd to
71db0eb
Compare
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
VersionNumbertype andMutating buildscript configurations) were upstream Chaquopy issues, fixed in 17.0.0Chaquopy 17.0.0 breaking change audit
--only-binarybuildPythonmust match app PythonOne 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
compileNoSentryDebugKotlin,compileDebugKotlin)--warning-mode all🤖 Generated with Claude Code