🟣 Compiler
Keep your Mac awake while Kotlin compiles
The Kotlin compiler can churn for a while on a large module or a native target. AwakeMate keeps your Mac awake until kotlinc has finished.
Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+
When your Mac sleeps mid-Kotlin
A direct kotlinc compile, or a Kotlin/Native build producing a binary, runs the JVM and the compiler hot for minutes with no input events. macOS reads the silence as idle and sleeps, cutting off compilation before the artefact is written. The output is incomplete and the incremental compilation state is left inconsistent, forcing a clean rebuild.
AwakeMate keeps it awake while Kotlin runs
AwakeMate recognises the Kotlin compiler by its process name, kotlinc, whether you invoke it directly or through a script. It reads only that short name on-device, so your source and project details never leave the machine.
Detected process: kotlinc
Tip: turn on "Sleep when tools go idle"
Compiling Kotlin is a concentrated CPU burst. With idle-sleep on, AwakeMate keeps the Mac awake while kotlinc is working and lets it sleep as soon as the compile finishes - so a one-off native build holds the Mac just long enough and no longer.
Get the most out of it
- Most Kotlin projects build through Gradle. If you use
./gradlew, add the Gradle process too so multi-module builds are fully covered. - Compiling Kotlin/Native targets? Those runs are longer - idle-sleep keeps the Mac up through the whole compile and rests it after.
More questions about Kotlintap to expand
I build Kotlin through Gradle, not kotlinc directly. What should I add?
Add the gradle process - that's what runs for ./gradlew builds. Add kotlinc as well if you ever compile directly.
Does it support Kotlin/Native builds?
Yes. Native compilation still runs under kotlinc, so AwakeMate keeps the Mac awake through it.
Does AwakeMate need any special permissions?
No. Process detection needs nothing - no Accessibility prompt, no profile. It just reads short process names locally.
What's the best way to keep my Mac awake while Kotlin is compiling?
Add the kotlinc process to AwakeMate and it keeps the Mac awake automatically whenever the compiler runs, including longer Kotlin/Native builds. With idle-sleep on it holds the Mac through the compile and then lets it sleep as soon as the artefact is written.
Can't I just run kotlinc under caffeinate?
You can - caffeinate -i kotlinc ... keeps the Mac awake for that command. But it is manual and all-or-nothing: you have to wrap every compile by hand, it stays awake until the process exits, and there's no idle-aware sleep or notch status. AwakeMate applies the same IOKit assertion automatically and releases it the instant the compile is done.
Why does my Mac sleep right in the middle of a kotlinc compile?
The compiler pins the JVM and CPU but never touches input devices, so macOS reads the quiet as idle and starts its sleep timer. AwakeMate watches for kotlinc and blocks idle sleep while it runs, without changing any of your saved energy preferences.
Will it keep my Mac awake for Kotlin with the lid closed, even on battery?
Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Kotlin runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.