From 0a5eb7a5b0e47c4f290d3ca6e87b4757264304e8 Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:30:02 +0300 Subject: [PATCH] =?UTF-8?q?[chore]=20bump=20AGP=209.0.1=20=E2=86=92=209.1.?= =?UTF-8?q?1=20=E2=80=94=20fix=20R8=20kotlin=20metadata=20warnings=20(#900?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(build): bump AGP 9.0.1 → 9.1.1 — fix R8 kotlin metadata warnings Kotlin 2.4.10 emits metadata the R8 bundled in AGP 9.0.1 cannot parse: 'WARNING: R8: An error occurred when parsing kotlin metadata' spam on every release build (the Kotlin↔R8 compatibility matrix requires R8 ≥ 9.1.29 for Kotlin 2.4). AGP 9.1.1 bundles R8 9.1.x — release build now warning-free. Verified locally: assembleRelease green with zero metadata warnings; unit suite 1029/0; device smoke — app connects with preserved token under R8 9.1. * fix(chat): removeLast() → removeAt(lastIndex) — API 35 call on minSdk 26 AGP 9.1's lint (newer NewApi check) flags java.util.List#removeLast(), resolved only as a Kotlin stdlib extension below API 35. Same semantics, lint-clean. --------- Co-authored-by: M57 --- .../com/m57/hermescontrol/ui/chat/components/MessageCards.kt | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/chat/components/MessageCards.kt b/app/src/main/java/com/m57/hermescontrol/ui/chat/components/MessageCards.kt index 2d6dfd40..115fea27 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/chat/components/MessageCards.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/chat/components/MessageCards.kt @@ -384,7 +384,7 @@ internal fun highlightSyntax(code: String): AnnotatedString = } else if (m.first.first > last.first.first) { // Overlap, this match starts later — it wins the overlapping portion // Keep the last match's pre-overlap, then replace - resolved.removeLast() + resolved.removeAt(resolved.lastIndex) // Split: keep text before overlap from last match if (last.first.first < m.first.first) { resolved.add(last.first.first..