+ 1
You can try to use Termux. It is a free linux terminal emulator on Play Market which has its own package manager. I haven't used Kotlin, but I used clang and rustc compilers there. The Kotlin package has size of 397 MB.
In the terminal
$ pkg install kotlin
You can connect the storage of your device by the following command
$ termux-setup-storage
and grant storage access permission on Android. That would creat symlinks under ~/storage in the Termux terminal emulator. I recommend to go to shared there. Now you can compile your project in that directory and write or change it with another code editing app on your device or directly in Termux with vim editor. You only need to have some basic skills how to work in linux terminal.
Termux is a very powerful app. Once I couldn't find liblapack binary package for aarch64 architecture to compile my code on my phone. I installed qemu in Termux and launched an alpine linux image for x86. Everything worked fine.