From 7b542d8d1e43bdfb914f9173b26f40ff87d7d335 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 10 Nov 2026 19:02:28 -0500 Subject: [PATCH] fix android builds in devshell --- android/settings.gradle.kts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index b59bc94..f07087d 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -23,4 +23,16 @@ plugins { id("org.jetbrains.kotlin.android") version "2.4.10" apply false } -include(":app") \ No newline at end of file +include(":app") + +// Flutter's plugin loader includes dev dependency plugins like integration_test as projects even in +// release builds (where they're never linked in). integration_test lives in the Flutter SDK, which +// is read-only under Nix, and Gradle 9+ refuses to configure a project whose directory isn't writable. +findProject(":integration_test")?.let { project -> + if (!project.projectDir.canWrite()) { + val copy = file("../build/integration_test_android") + copy.deleteRecursively() + project.projectDir.copyRecursively(copy) + project.projectDir = copy + } +} \ No newline at end of file