diff --git a/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/utils/VariableFactory.kt b/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/utils/VariableFactory.kt index d8b6cd0..03cb9a8 100644 --- a/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/utils/VariableFactory.kt +++ b/sweetproperty-gradle-plugin/src/main/java/com/highcapable/sweetproperty/utils/VariableFactory.kt @@ -21,6 +21,12 @@ */ package com.highcapable.sweetproperty.utils +/** + * 转换当前 [Map] 键值到字符串类型 + * @return [Map]<[String], [String]> + */ +internal inline fun Map.toStringMap() = mapKeys { e -> e.key.toString() }.mapValues { e -> e.value.toString() } + /** * 当数组不为空时返回非空 * @return [T] or null