Why no package manager for Kotlin (or java)?

It was sarcasm. I recommended it to @alex22 since he obviously deserves it. I am a fan of Gradle. I like to criticize it from time to time since there are problems (for example plugin management should be completely redone). Still, the reliable build system is one of the cornerstones of the Kotlin ecosystem. And even if it is a little bit more complicated, the reliability is much more important…

1 Like

Poe’s Law strikes again… :slight_smile:

Mind you, if I’d said:

…then I wouldn’t have been sure whether I was being sarcastic or not! Yes, a reliable build system is vital — but Gradle will have to make up for a lot of previous pain before I’ll call it ‘reliable’.

1 Like

In my experience there are problems with gradle, but they usually begin in places, other build systems just do not reach.

5 Likes

Well there is the point that it is hard to learn for newcomers. Everything that requires more than just a dependency block can get quite complicate to figure out. The documentation is quite good (in my experience) but since gradle is so versitile it’s still sometimes hard to find what you need. Also lots of gradle plugins and example build scripts are written in goovy and tbh groovy is terrible to read in a complicated system.
Other than that I can’t complain about gradle.

Most of the Gradle files are there for 2 purposes:

  • Other developers do not have to manually download Gradle. The wrapper script will do that for them.
  • Everybody uses the same Gradle version to build the project.

gradle.properties is there so you can do local customization (so do not commit it) of the build.

Are you seriously complaining about .gitattributes?

2 Likes

Only thing I miss from, say package.json or maven to some degree, is IDE code completion/suggestion on version or package information… Unless I have missed some setting/plugin in intellij (please let me know!), I find myself going to the web to find version info on packages more often than when using maven/pom.xml. I guess providing version info in Gradle is more flexible so thus harder to create code assist functionality.

Other than that, much prefer Gradle :slight_smile:

@ccfnz Version completion is working in groovy gradle. It should work for kts soon if not already.

1 Like

Just curious: why did you guys pick Gradle over Maven?

1 Like

Any coding/logic in Maven is very quickly an incomprehensible mess of xml tags. Gradle has more advanced capabilities while still being able to consume maven artefacts.

Also maven is the standard for most java applications. Kotlin is build on the java ecosystem so supporting maven is necessary to make it easier for people and teams to switch.