AGP 9 bump v2.0.1 - #23
Open
michelutke wants to merge 26 commits into
Open
Conversation
…and jetifier No deprecations found in build scripts (Task 1 baseline: zero Gradle deprecation warnings), so Step 4 of the brief is a no-op. Verification build shows only two pre-existing source-level warnings unrelated to Gradle/AGP (Compose menuAnchor(), Java overridePendingTransition), both in production src/ and out of scope for this task.
… targetSdk KMP modules (updraft-core, updraft-ui-compose) fail configuration under AGP 9 with com.android.library + kotlin.multiplatform; they migrate to the new com.android.kotlin.multiplatform.library target plugin in follow-up commits.
…ry with androidResources enabled
AGP 9's built-in Kotlin no longer allows org.jetbrains.kotlin.multiplatform
together with com.android.application in the same module. Per Kotlin's own
AGP 9 migration guide, the prescribed fix is to extract the Android entry
point into its own application module and convert the shared code module to
the Android-KMP library plugin (com.android.kotlin.multiplatform.library).
sample/composeApp is now that shared library (androidTarget + iOS targets,
namespace com.appswithlove.updraftsdk.shared); the new sample/androidApp
module holds the app shell (manifest, MainActivity, App, launcher resources,
signing, applicationId/versionCode/versionName, build types) and depends on
composeApp and updraft-sdk.
The com.appswithlove.updraft 2.3.0 plugin is parked (commented out) in
sample/androidApp/build.gradle.kts: it casts the AGP application extension to
the removed legacy AppExtension type
("ApplicationExtensionImpl$AgpDecorated_Decorated cannot be cast to
AppExtension") and fails to apply under AGP 9. Catalog entry and root
apply-false are left intact; see TODO(#16) at the commented plugin alias to
re-enable once the plugin ships AGP 9 support.
composeMultiplatform capped at 1.10.3 instead of the planned 1.11.1: 1.11.0/1.11.1 ship iOS components-resources klibs built with a newer Kotlin/Native ABI (2.3.0) than our pinned Kotlin 2.2.21 can consume, breaking iosSimulatorArm64Test. 1.10.3 is the newest CMP release that still builds, tests, and publishes cleanly on 2.2.21.
Mark AGP 9 upgrade as implemented on feature/toolchain-agp9 with the final version set (Gradle 9.6.1, AGP 9.3.1, CMP 1.10.3, vanniktech 0.37.0, dokka 2.2.0, loco 1.2.0, androidx.startup 1.2.0, coveralls 2.12.2), sample split, and parked updraft plugin. README Kotlin compatibility matrix verified accurate, no change needed.
The AGP 9 incompatibility only affected plugin 2.x; 3.0.0 (released 2026-01-22) requires AGP 9+ and applies cleanly. Removes the TODO(#16) park from sample/androidApp and restores the updraft {} upload wiring.
Applied at root with no jacoco setup and no CI task invoking it, so it produced nothing while adding a plugin to re-validate on every toolchain bump. Resolves the 'verify or drop' item from #16.
Toolchain migration: AGP 9, Gradle 9, built-in Kotlin, plugin upgrades
chore: bump version to 2.0.1
View.draw into a software Canvas throws "Software rendering doesn't support hardware bitmaps" on any Compose screen or View tree containing a hardware bitmap, crashing the host app on shake. Use PixelCopy on the window (API 24+, callback on a background HandlerThread so the blocking main thread is not deadlocked), keep View.draw as pre-24 fallback, and never let a failed capture propagate: feedback opens without a screenshot instead. Fixes #25
- ScreenshotGrabber.capturePng() is now a suspend fun. Android awaits PixelCopy via suspendCancellableCoroutine on the main looper (API 24-33) or PixelCopy.Request with the main executor (API 34+), 2 s timeout, and encodes PNG on Dispatchers.Default. The main thread is never blocked. - Updraft.showFeedback() launches on a Main scope, ignores overlapping calls while a capture is in flight, and catches any Throwable from the grabber so a failed screenshot can never crash the host app. - New Updraft.screenshotGrabber hook lets hosts supply their own capture, replacing the 1.x ScreenshotProvider. Refs #25
Fix shake-to-feedback crash on Compose / hardware-bitmap screens (2.0.1)
yannickpulver
approved these changes
Sep 3, 2026
| @@ -0,0 +1,112 @@ | |||
| # AGP 9 / Gradle 9 Toolchain Migration — Design | |||
Collaborator
There was a problem hiding this comment.
denke docs müssen wir nicht einchecken oder findest du?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.