From 9a9602d10f57122fb6b2fd8c1937bb512b9a58ae Mon Sep 17 00:00:00 2001 From: Konstantin Tskhovrebov Date: Fri, 12 Jul 2024 14:05:39 +0200 Subject: [PATCH] [gradle] Create static android assets directory if it doesn't exist --- .../org/jetbrains/compose/resources/AndroidResources.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt index ac36cf5bb3..dc1d177d4a 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt +++ b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt @@ -53,7 +53,9 @@ internal fun Project.configureAndroidComposeResources( } //https://issuetracker.google.com/348208777 - variant.sources.assets?.addStaticSourceDirectory(variantAssetsDir.get().asFile.path) + val staticDir = variantAssetsDir.get().asFile + staticDir.mkdirs() + variant.sources.assets?.addStaticSourceDirectory(staticDir.path) tasks.configureEach { task -> if (task.name == "merge${variant.name.uppercaseFirstChar()}Assets") { task.dependsOn(copyVariantAssets)