I have a low-spec potato laptop (i3 gen 3 2ghz with 8gb ram), and I’ve tried using Gradle with IntelliJ—it felt like my laptop was about to explode. I looked for alternatives and tried Gradle with VSCode. This time it didn’t feel like it was going to explode, but it was still very heavy. Finally, I tried Maven with VSCode, and with this setup, my laptop ran normally like usual. My question is: is it okay to develop Kotlin using the Maven build system? From what I’ve read, Kotlin is very tightly integrated with Gradle. My second question is: is Amper a lighter build system than Gradle and could I use it to replace Maven, or is it actually the opposite?
It may depend upon the platform you’re building for. But for example it’s very possible to build Kotlin/JVM libraries and Spring apps using Maven.
(IME Maven’s simpler, quicker to run, easier to figure out, better documented, and causes fewer problems. However, it’s also much more verbose, more limited in what it can do, and I don’t know how good a bet it is for the long term.)
If you just wanna do Kotlin development for the JVM, Maven is 100% a viable option. My work uses it for almost all of our Kotlin microservices.
If you wanna do stuff like Jetpack Compose, or Ktor, or multiplatform, or native, or even Android development… then I think you need Gradle. (Android development might be possible with Maven)
Oh, I thought Ktor was like Spring Boot could use Maven?. btw, Thanks for the response guys
Tbh I don’t actually know with Ktor. I’ve used Ktor for a personal project, and there’s a Gradle plugin for Ktor, but I don’t actually know what it does. It might be completely possible to develop a Ktor application without the plugin.
I do know that Jetpack Compose NEEDS the Gradle plugin, as the plugin acts as a transformer at compile time, transforming the function components by adding extra parameter(s). As far as I know, there’s no Maven plugin to do that compile time transformation for Jetpack Compose.
I never used Maven with Kotlin myself, but I don’t see why we wouldn’t be able to use Ktor+Maven. Ktor is mostly a library and we can build Kotlin applications with libraries using Maven. There is some Ktor plugin for Gradle, but I guess this is only to make things a little smoother and we can live without it.
Multiplatform and mobile development is entirely different story. It requires a lot of complicated build logic, so it integrates tightly with the build system.