baxter
04/17/2024, 4:33 AMkotlin-kapt
plugin is in maintenance mode, but there is a pretty severe file leak within the Kapt.kt
file here. I found this occurring within the Gradle daemon each time that an app build occurred in an Android project. To emphasize the severity, assembling the APK in an Android Gradle build with a single project easily leads to 800+ open file descriptors in the Gradle daemon, with more files being opened in subsequent runs of assemble
. In a real world case with a Gradle build that contains >5k projects, this leaves at least 3.5k open file descriptors (there are more, but that was the largest grouping of open files with a similar stack trace).
I've reported the issue here: https://youtrack.jetbrains.com/issue/KT-67495/File-leak-in-when-building-with-kapt
And a PR for the fix here: https://github.com/JetBrains/kotlin/pull/5290