Repository navigation
Target API 36 and modernize the build for 2026 Play requirements - #11
Conversation
Google Play now requires new apps and updates to target API 36. Apps targeting API 34 or lower, like this one, are no longer offered to new users on Android 15+ devices. - targetSdk 34 -> 36, compileSdk 34 -> 36, minSdk 16 -> 23 (AndroidX, including AppCompat 1.8, now requires 23) - AGP 7.2.2 -> 9.5.0, Gradle 7.3.3 -> 9.6.1, jcenter -> mavenCentral, plugins block + version catalog (gradle/libs.versions.toml) - AppCompat 1.0.2 -> 1.8.0. This pulls in current fragment/annotation versions, fixing the outdated-SDK warnings in #7. - Remove unused material, constraintlayout, navigation and test dependencies, plus the unused fileTree jars and Jetifier - Remove the unused WRITE_EXTERNAL_STORAGE permission - Edge-to-edge (enforced for apps targeting 35+, with no opt-out at 36): new SystemBars helper turns it on with dark system-bar icons and pads each screen so the navigation bar doesn't cover content - Html.fromHtml -> HtmlCompat.fromHtml (the old call is deprecated now that minSdk is 23) - CI: JDK 21, checkout@v7, setup-java@v6, gradle/actions/setup-gradle@v6 - Dependabot: one grouped update PR a month for Gradle deps and Actions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv
CI's wrapper validation (on by default in gradle/actions/setup-gradle) rejected the gradle-wrapper.jar committed in 2023. Its checksum (e2b82129...) isn't in Gradle's list of official wrapper jars. The new jar's SHA-256 (3b8a2577...) is the official checksum for the Gradle 9.8.1 wrapper, as listed in gradle/actions' wrapper-checksums.json. It, gradlew, gradlew.bat and gradle-wrapper.properties come from gradle/actions' test fixtures. The distribution is Gradle 9.8.2, pinned with distributionSha256Sum. AGP 9.5 needs Gradle 9.6 or newer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv
There was a problem hiding this comment.
🟡 Changes recommended
Inset handling omits the action bar’s top inset and keyboard bottom inset, allowing initial content to sit beneath the action bar and the country input to become obscured by the keyboard.
2 open issues
What changed in this PR
Modernizes the Android app for target API 36 and updates AppCompat to address the outdated-library warnings in #7.
Changes:
- Raises compile/target SDK to 36 and minimum SDK to 23; updates build tooling, dependencies, and repository configuration.
- Adds shared edge-to-edge handling, adopts
HtmlCompat, and removes the unused storage permission. - Updates CI, refreshes Gradle wrapper scripts, and adds monthly grouped Dependabot updates.
| File | Description |
|---|---|
settings.gradle |
Centralizes plugin and dependency repositories. |
gradlew.bat |
Adds the updated Windows wrapper launcher. |
gradlew |
Refreshes the POSIX wrapper launcher. |
gradle/wrapper/gradle-wrapper.properties |
Selects Gradle 9.8.2 with checksum verification. |
gradle/libs.versions.toml |
Defines AppCompat and Android plugin versions. |
gradle.properties |
Updates JVM settings and removes Jetifier. |
build.gradle |
Uses the version-catalog plugin alias. |
app/src/main/java/atorch/shortestpaths/SystemBars.java |
Adds shared edge-to-edge and inset handling. |
app/src/main/java/atorch/shortestpaths/SolvePuzzle.java |
Applies system-bar setup and adopts HtmlCompat. |
app/src/main/java/atorch/shortestpaths/MainActivity.java |
Applies system-bar setup and adopts HtmlCompat. |
app/src/main/AndroidManifest.xml |
Removes the unused storage permission. |
app/build.gradle |
Updates SDK levels, Java compatibility, and dependencies. |
.github/workflows/actions.yml |
Updates actions and uses JDK 21. |
.github/dependabot.yml |
Groups monthly Gradle and GitHub Actions updates. |
Review effort: Balanced
| Insets bars = insets.getInsets( | ||
| WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); |
There was a problem hiding this comment.
Fixed in f6b373b, though with a bottom margin equal to the keyboard height rather than adding the keyboard to the padding. A margin shrinks the ScrollView to the area above the keyboard, the same as adjustResize used to. ScrollView then keeps the focused field in view by itself (onSizeChanged, and the TextView's own request to bring its cursor on screen). With padding, ScrollView's visibility check ignores the padded area, so it would treat a field behind the keyboard as already visible (the same problem atorch/probability_puzzles#49 hit). The top-inset comment is fixed in the following commit, as a top margin.
Generated by Claude Code
| ViewCompat.setOnApplyWindowInsetsListener(view, (v, insets) -> { | ||
| Insets bars = insets.getInsets( | ||
| WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()); | ||
| v.setPadding(left + bars.left, top, right + bars.right, bottom + bars.bottom); |
…edge
Once the app is drawn edge-to-edge, windowSoftInputMode="adjustResize"
no longer resizes the window when the keyboard opens. On a puzzle with
several countries to enter, the answer field moves down with every
correct answer and ends up behind the keyboard. The released app
(targetSdk 34, not edge-to-edge) doesn't have this problem; the
previous commit would have introduced it.
SystemBars now handles the keyboard's insets itself. It gives the
layout's root a bottom margin equal to the keyboard height, so the
ScrollView shrinks to the area above the keyboard exactly as
adjustResize used to. ScrollView's own logic (onSizeChanged, plus the
focused TextView requesting its cursor on screen) then keeps the field
in view, so no manual scrolling is needed. Navigation bar padding only
covers whatever part of the bar the keyboard doesn't cover.
SolvePuzzle now declares adjustResize explicitly rather than leaving it
to the default ("unspecified"), so the system doesn't also pan the
window.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv
EdgeToEdge.enable sets SYSTEM_UI_FLAG_LAYOUT_STABLE. In that mode AppCompat's ActionBarOverlayLayout doesn't give the content a top margin for the action bar. It lays the content out from the top of the window and adds the action bar's height to the top inset it passes down. Since SystemBars ignored the top inset, the top of each screen would have been hidden under the action bar. (Found by Copilot's review on PR #11.) Apply the top inset (status bar + action bar) as a top margin. With padding, scrolled content would show through the transparent status bar above the action bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv
Until now CI only ran on PRs into main, so a PR based on another PR's branch got no build at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv

Fixes #7.
Why
Google Play's target API level rules, from August 31, 2026:
targetSdk 34, Play would reject our next upload.The "outdated" warnings in #7 (
fragment1.0.0,annotation1.0.0) come in throughappcompat 1.0.2. Upgrading AppCompat fixes them.Changes
targetSdk34 → 36,compileSdk34 → 36,minSdk16 → 23. AppCompat 1.8 and the rest of AndroidX now require 23.jcenter→mavenCentral.plugins {}block and a version catalog (gradle/libs.versions.toml).proguard-rules.proreference to a file that doesn't exist.setup-gradlerejected it. It's replaced with the official wrapper, checked against Gradle's published checksums, and the distribution is pinned by SHA-256.material,constraintlayout,navigation-*, test libraries andlibs/fileTree.WRITE_EXTERNAL_STORAGEpermission.SystemBarshelper:EdgeToEdge.enable, AppCompat no longer pushes the content below the action bar; it adds the action bar's height to the top inset instead (found by Copilot's review);adjustResizefrom resizing the window, so it applies the keyboard height as a bottom margin. The ScrollView shrinks to the area above the keyboard, as it did before, and keeps the focused answer field in view. Without this, the field ended up behind the keyboard after a couple of correct answers, the same problem as Fix keyboard covering the answer field on long puzzles probability_puzzles#49.SolvePuzzlealso declaresadjustResizeexplicitly.Html.fromHtml→HtmlCompat.fromHtml.actions/checkout@v7,actions/setup-java@v6,gradle/actions/setup-gradle@v6;Testing
Notes
ReviewMapneedsSystemBars.setUp(this), or its own inset handling so the map can draw behind the bars.versionCodeis still 5. Bump it at release.🤖 Generated with Claude Code
https://claude.ai/code/session_01HwXCddsMirbBTNqxSqT6iv