Skip to content

Dependency updates for v2026.4#7302

Open
grzesiek2010 wants to merge 27 commits into
getodk:masterfrom
grzesiek2010:dependencies_v2026.4
Open

Dependency updates for v2026.4#7302
grzesiek2010 wants to merge 27 commits into
getodk:masterfrom
grzesiek2010:dependencies_v2026.4

Conversation

@grzesiek2010

@grzesiek2010 grzesiek2010 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Why is this the best possible solution? Were any other approaches considered?

As usual, I've updated the dependencies for the next release. Things worth mentioning:

  1. Added a dependency update policy. ./gradlew dependencyUpdates now reports available updates, but only for stable versions that are at least 14 days old. Note this doesn't fail, or block builds if a newer version is used, it's purely a report/suggestion.
  2. Added dependency locking. collect_app/gradle.lockfile now pins the exact resolved dependency versions for the debug and all release variants, preventing unintended transitive or dynamic version changes from silently affecting builds.
  3. Fixed ktlint instead of replacing it with detekt (for now). Since AGP 9, the old ktlint-gradle plugin had stopped linting Kotlin sources in Android modules, making it effectively a no-op. Upgrading to version 14.2.0 restored linting and surfaced a number of violations, which were fixed as part of this change.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No need to test anything here.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010
grzesiek2010 force-pushed the dependencies_v2026.4 branch 8 times, most recently from 2cc3e33 to d270ca8 Compare July 14, 2026 14:01
@grzesiek2010
grzesiek2010 force-pushed the dependencies_v2026.4 branch 4 times, most recently from 9e0e567 to 2a41a2c Compare July 15, 2026 21:30
@grzesiek2010
grzesiek2010 force-pushed the dependencies_v2026.4 branch from 2a41a2c to fb26935 Compare July 15, 2026 21:38
@grzesiek2010
grzesiek2010 marked this pull request as ready for review July 15, 2026 21:50
@grzesiek2010
grzesiek2010 requested a review from seadowg July 15, 2026 21:50
@@ -0,0 +1 @@
sdk=33

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably bump the Robolectric target SDK up right?

Comment thread gradle/libs.versions.toml
@@ -1,70 +1,73 @@
# After changing any version here, regenerate the dependency lockfile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if I change a version or add a dependency without running --write-locks? I think a comment here is going to be very easy to miss: it's a long file, and you can scroll past or even just never see it if navigation from a linked definition. I'm thinking we really need an automated check for this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If you change or add a dependency without updating the lockfile, the build fails, so it's not possible to miss it.

Comment thread config/dependency_updates.gradle Outdated
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.TimeUnit

if (!project.hasProperty("runDependencyUpdates")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we check for this? This isn't something that would change dynamically right?

Comment thread config/dependency_updates.gradle Outdated
if (!project.hasProperty("runDependencyUpdates")) {
tasks.register("dependencyUpdates", Exec) {
def gradlew = System.getProperty("os.name").toLowerCase().contains("windows") ? "gradlew.bat" : "./gradlew"
commandLine gradlew, "dependencyUpdates", "--no-parallel", "-PrunDependencyUpdates=true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really need to call back to gradlew through commandLine here to execute these tasks? I think if we just want an alias we can just add a bash script right?

Comment thread config/dependency_updates.gradle Outdated

if (!project.hasProperty("runDependencyUpdates")) {
tasks.register("dependencyUpdates", Exec) {
def gradlew = System.getProperty("os.name").toLowerCase().contains("windows") ? "gradlew.bat" : "./gradlew"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I kind of think we should ditch the Windows dev support stuff if I'm being honest. No one is looking at it, and I don't think it's worth the effort for us to care about.

Comment thread config/dependency_updates.gradle Outdated
return stableKeyword || version ==~ /^[0-9.v-]+(-r)?$/
}

def ageCache = new ConcurrentHashMap()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this just there to save on network calls for repeated dependencies?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, and it's a big saving in practice.

@grzesiek2010
grzesiek2010 force-pushed the dependencies_v2026.4 branch from a32cc73 to a28e8c3 Compare July 21, 2026 16:05
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