read-build-logs-bottom-up
Read build logs bottom-up, then jump to the first error
Build tools print in causal order and report in reverse. A Kotlin/Gradle-style run puts the
compiler's own diagnostics (e: file.kt:42:9 Unresolved reference) near the top, then the
task list, then the summary banner (BUILD FAILED in 2m 31s) at the bottom. The two pieces
you need are therefore as far apart as they can be, and no fixed-size window from either end
contains both.
tail -40 on that log shows > Task :app:compileKotlin FAILED and the banner. It does not show
what failed to compile. The usual result is a second full build, purely to see a message that was
already on disk.
The reading order that works: bottom for the verdict, then the first error marker for the cause. Never a fixed N.
The recorded case
In a multiplatform media app, this was raised repeatedly with the same automated assistant and kept recurring. Two distinct failures were recorded: