File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,7 @@ public open class KotlinApiBuildTask @Inject constructor(
105105 .filterOutAnnotated(nonPublicMarkers.map(::replaceDots).toSet())
106106
107107 outputApiDir.resolve(" $projectName .api" ).bufferedWriter().use { writer ->
108- filteredSignatures
109- .sortedBy { it.name }
110- .forEach { api ->
111- writer.append(api.signature).appendLine(" {" )
112- api.memberSignatures
113- .sortedWith(MEMBER_SORT_ORDER )
114- .forEach { writer.append(" \t " ).appendLine(it.signature) }
115- writer.appendLine(" }\n " )
116- }
108+ filteredSignatures.dump(writer)
117109 }
118110 }
119111
Original file line number Diff line number Diff line change @@ -313,15 +313,16 @@ public fun List<ClassBinarySignature>.dump(): PrintStream = dump(to = System.out
313313
314314@ExternalApi
315315public fun <T : Appendable > List<ClassBinarySignature>.dump (to : T ): T {
316- forEach { classApi ->
317- with (to) {
318- append(classApi.signature).appendLine(" {" )
319- classApi.memberSignatures
320- .sortedWith(MEMBER_SORT_ORDER )
321- .forEach { append(" \t " ).appendLine(it.signature) }
322- appendLine(" }\n " )
316+ sortedBy { it.name }
317+ .forEach { classApi ->
318+ with (to) {
319+ append(classApi.signature).appendLine(" {" )
320+ classApi.memberSignatures
321+ .sortedWith(MEMBER_SORT_ORDER )
322+ .forEach { append(" \t " ).appendLine(it.signature) }
323+ appendLine(" }\n " )
324+ }
323325 }
324- }
325326 return to
326327}
327328
You can’t perform that action at this time.
0 commit comments