Work around screenshot bug

that leaks memory and runs out of heap space
This commit is contained in:
Torsten Grote
2026-04-01 12:07:00 -03:00
parent e1ec9dd8a4
commit 55a45f2b3e

View File

@@ -193,3 +193,14 @@ val gitHash: String
process.waitFor() // Ensure the command completes
return process.inputStream.use { it.readBytes().decodeToString().trim() }
}
// workaround for https://issuetracker.google.com/issues/430260686
// also https://issuetracker.google.com/issues/469819154
// and https://issuetracker.google.com/issues/444048026
tasks.withType<com.android.compose.screenshot.tasks.PreviewScreenshotValidationTask> {
maxHeapSize = "4g"
}
tasks.withType<com.android.compose.screenshot.tasks.PreviewScreenshotUpdateTask> {
maxHeapSize = "4g"
}