fix aw reading
All checks were successful
Publish to snapshot maven / build (push) Successful in 18s

This commit is contained in:
moehreag 2024-06-10 21:34:38 +02:00
parent 2d2dc33e00
commit 1bf8e83255

View file

@ -62,9 +62,11 @@ object AccessWidener {
private fun readAW(project: Project): Stream<String> { private fun readAW(project: Project): Stream<String> {
val awFile = getAWFile(project) val awFile = getAWFile(project)
println("Found accesswidener in project: $awFile") println("Found accesswidener in project: $awFile")
return awFile?.bufferedReader(StandardCharsets.UTF_8).takeIf { HEADER.test(readlnOrNull()?: "") }?.lines() return awFile?.bufferedReader(StandardCharsets.UTF_8)
?.map { it.replace("transitive-", "") } .takeIf { HEADER.test(it?.readLine()?:"") }?.lines()
?: Stream.empty() ?.map { it.replace("transitive-", "") }
?: Stream.empty()
} }
private fun readTransitiveAW(path: Path): Stream<String> { private fun readTransitiveAW(path: Path): Stream<String> {