From 32ce0c6c0efff6da3edba82f5b438ed60d56ee2d Mon Sep 17 00:00:00 2001 From: Chanjung Kim Date: Mon, 18 Mar 2024 00:59:56 +0900 Subject: [PATCH] chore: add a default value to Res.getAsFlow's byteCount --- .../kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt index e4d35becf9..75e85165b3 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt +++ b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/ResourcesSpec.kt @@ -176,7 +176,11 @@ internal fun getResFileSpecs( """.trimIndent() ) .addParameter("path", String::class) - .addParameter("byteCount", Int::class) + .addParameter( + ParameterSpec.builder("byteCount", Int::class) + .defaultValue("%L", 8192) + .build() + ) .returns( ClassName("kotlinx.coroutines.flow", "Flow") .plusParameter(ByteArray::class.asTypeName())