diff --git a/build-common/src/org/jetbrains/kotlin/build/serializationUtils.kt b/build-common/src/org/jetbrains/kotlin/build/serializationUtils.kt index e9f8f825cfd..38195773d91 100644 --- a/build-common/src/org/jetbrains/kotlin/build/serializationUtils.kt +++ b/build-common/src/org/jetbrains/kotlin/build/serializationUtils.kt @@ -16,7 +16,6 @@ package org.jetbrains.kotlin.build -import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments import org.jetbrains.kotlin.cli.common.arguments.collectProperties import kotlin.reflect.KClass import kotlin.reflect.full.memberProperties @@ -77,7 +76,15 @@ fun transformClassToPropertiesMap(classToTransform: T, excludedPropert .filter { property -> property.name !in excludedProperties } .associateBy( keySelector = { property -> property.name }, - valueTransform = { property -> property.get(classToTransform).toString() }) + valueTransform = { property -> + property.get(classToTransform).let { value -> + if (value is Array<*>) { + (property.get(classToTransform) as Array<*>).joinToString(",") + } else { + property.get(classToTransform).toString() + } + } + }) fun List.joinToReadableString(): String = when { size > 5 -> take(5).joinToString() + " and ${size - 5} more"