Skip to content

Commit

Permalink
Skip module-info.java from processing
Browse files Browse the repository at this point in the history
  • Loading branch information
qwwdfsad committed Aug 26, 2021
1 parent 8359169 commit 24c059b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/kotlin/api/KotlinSignaturesLoading.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ public fun JarFile.loadApiFromJvmClasses(visibilityFilter: (String) -> Boolean =

@ExternalApi
public fun Sequence<InputStream>.loadApiFromJvmClasses(visibilityFilter: (String) -> Boolean = { true }): List<ClassBinarySignature> {
val classNodes = map {
it.use { stream ->
val classNodes = mapNotNull {
val node = it.use { stream ->
val classNode = ClassNode()
ClassReader(stream).accept(classNode, ClassReader.SKIP_CODE)
classNode
}
// Skip module-info.java from processing
if (node.name == "module-info") null else node
}

// Note: map is sorted, so the dump will produce stable result
Expand Down

0 comments on commit 24c059b

Please sign in to comment.