tony
11/05/2026, 8:53 PM./gradlew app:assembleDebug (to fill up the local build cache)
2. killall -9 java
3. rm -rf app/build/ && rm -rf app-old/build/
4. ./gradlew app:assembleDebug --no-build-cache
I observe a compiler daemon spawn when app-old:compileDebugKotlin starts, and a second daemon starts when app:compileDebugKotlin starts. I think it's that app-old is so large. Sort of a "hairball" module that's being actively modularized as I write this. My working hypothesis is that it's a resource constraint. Using daemonitor-cli, I can see the original compiler daemon reach CRIT MEM while compiling app-old (it is far below it's Xmx value, though). I can't rule out that there's something difference between those two modules that triggers this. The two daemons have essentially identical JVM argstony
11/05/2026, 9:03 PM-Dkotlin.daemon.initiator.marker.file=/var/folders/gc/72bxcq0j7rgfvd7wfx7tbxxw0000gn/T/kotlin-compiler-client-9620956159641280546-is-runningtony
11/05/2026, 11:05 PMapp module:
configurations
.matching { it.name != "detekt" }
.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion(libs.versions.jetbrains.kotlin.library.get())
}
}
}
and this also configured the kotlinBuildToolsApiClasspath configuration (again, just in app). In particular, just app had kotlin-reflect 2.4.21 on that classpath, while everywhere else had kotlin-reflect at 1.6.10. So I think it's the changing classpath causing a new daemon to spawn when app gets compiled.
Very weird that kotlin-reflect 1.6.10 is still hanging around everywhere. Reminds me of the issue that led to me writing this blog post