fix: upgrade okhttp and sardine dependencies for improved functionality#705
fix: upgrade okhttp and sardine dependencies for improved functionality#705
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades okhttp and sardine dependencies to improve functionality by switching from the guardianproject sardine-android library to the elelan sardine-android fork, which supports the latest okhttp version 5.1.0.
- Updates okhttp from version 4.12.0 to 5.1.0
- Replaces guardianproject sardine-android with elelan sardine-android fork
- Updates various other dependencies to their latest versions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| settings.gradle.kts | Adds dependency resolution for new sardine-android forks |
| gradle/libs.versions.toml | Updates dependency versions including okhttp upgrade and adds new sardine library reference |
| app/build.gradle.kts | Switches sardine implementation from guardianproject to elelan fork |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
gradle/libs.versions.toml
Outdated
| navigation = "2.9.3" | ||
| okhttp = "4.12.0" | ||
| okhttp = "5.1.0" | ||
| thegrizzlylabs-sardine = "0.9" |
There was a problem hiding this comment.
The thegrizzlylabs-sardine version is defined but not used in the actual implementation. Consider removing this unused version definition to avoid confusion.
| thegrizzlylabs-sardine = "0.9" |
gradle/libs.versions.toml
Outdated
| retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" } | ||
| retrofit-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" } | ||
| guardianproject-sardine = { group = "com.github.guardianproject", name = "sardine-android", version = "89f7eae512" } | ||
| thegrizzlylabs-sardine = { group = "com.github.thegrizzlylabs", name = "sardine-android", version.ref = "thegrizzlylabs-sardine" } |
There was a problem hiding this comment.
The thegrizzlylabs-sardine library definition is added but not used in the actual implementation. Consider removing this unused library definition to avoid confusion.
| thegrizzlylabs-sardine = { group = "com.github.thegrizzlylabs", name = "sardine-android", version.ref = "thegrizzlylabs-sardine" } |
| includeModule("com.github.derlio", "audio-waveform") | ||
| includeModule("com.github.abdularis", "circularimageview") | ||
| includeModule("com.github.guardianproject", "sardine-android") | ||
| includeModule("com.github.thegrizzlylabs", "sardine-android") |
There was a problem hiding this comment.
The thegrizzlylabs sardine-android module is included but not used in the actual implementation. Consider removing this unused module inclusion to avoid confusion.
| includeModule("com.github.thegrizzlylabs", "sardine-android") |
| implementation("com.github.elelan:sardine-android:0.1.0-alpha03") | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Using an alpha version (0.1.0-alpha03) in production code introduces stability risks. Consider using a stable release version or documenting the rationale for using an alpha version.
| // NOTE: Only alpha versions of sardine-android are available as of June 2024. | |
| // We use 0.1.0-alpha03 for WebDAV support, as no stable release exists. | |
| // Risks: Potential instability. Mitigation: Pin version, monitor upstream, and test thoroughly. | |
| implementation("com.github.elelan:sardine-android:0.1.0-alpha03") |
app/build.gradle.kts
Outdated
| // adding web dav support: https://github.com/thegrizzlylabs/sardine-android' | ||
| //implementation(libs.guardianproject.sardine) | ||
| //implementation(libs.thegrizzlylabs.sardine) | ||
| implementation("com.github.elelan:sardine-android:0.1.0-alpha03") |
There was a problem hiding this comment.
The sardine dependency is hardcoded instead of using the version catalog approach used elsewhere in the project. Consider defining this in libs.versions.toml for consistency.
| implementation("com.github.elelan:sardine-android:0.1.0-alpha03") | |
| implementation(libs.sardine.android) |
# Conflicts: # gradle/libs.versions.toml
Cloned and upgraded the sardine-android library to use the latest okhttp version (4.12.0 to 5.1.0)
original library: https://github.com/guardianproject/sardine-android
new library: https://github.com/Elelan/sardine-android