Skip to content
Source

Why Android projects are so complex

Here on Reddit a guy came, says that in this Android of yours the project is too complex and here in our Rust we created a main file and off we go.

They threw everything possible at him there for this. They say there are reasons for everything, there's nothing unnecessary there, and so on. Some kind of Stockholm syndrome, honestly. I'd say that if you abstract from his behavior, why not ask such a question.

It's as if we've gotten used to the fact that any project by default is a million files, packages and configurations. But in fact, the absolute majority of projects don't need it at all.

I'm too old, for example, to remember that before Android Studio and before Gradle we didn't have it so complicated out of the box. Gradle brought most of these tricks. Here we have the wrapper itself, and where to download it from, and scripts for running Gradle, and Gradle configs where some repositories and plugins common to all are listed. Google kindly enables the Android tab for us, where all this "garbage" is hidden. 🙄

Further more, there's an app module, it has build variants, they have code and manifest, resources, even the default icon in five different folders. There are generated example tests that nobody writes. In my opinion, a fairly logical question is why do I need all this in any small project.

At the same time, if we go to Idea and create an empty Kotlin project, there won't be submodules as we're used to, all the code is in src, that's it. However, all the rest of Gradle stuff is in place.

Yes, it all makes sense, but from Gradle you usually only need to specify third-party libs. And we, on large projects with non-trivial teams, would somehow figure it out from the documentation on how to add all this when necessary. The question is about defaults.