Why does Gradle need so much stuff?

I am trying to follow the tutorial here :

After doing a kotlin tutorial, I’m trying to code an app which will write “Hello World!”. I read online that kotlin was easy to use, simple, compact… Yes, except when the output is to be run on Android!

On top of the kotlin compiler, I installed android-sdk and gradle on Ubuntu. I like to keep my programs under control, so I usually code on an advanced text editor, kwrite, instead of using a coding platform. (In case you wonder, this actually improves my productivity). I was expecting to have to link to a library or two. “#include android.h” or that kind of things.

But Gradle added so many files on my computer that I’ve lost count. It created 2 “licenses” folders (which stopped the compiler with “licenses not accepted” errors until I found out where the problem was coming from). Now it’s complaining that it can’t find some API (LintError).

It feels like I’m debugging, but debugging what? I haven’t written a single line of code yet! I’ll probably never use 99% of what got in my computer. Why isn’t there a simple way to code an application writing “Hello World!” when tapped? The advanced libraries could be installed later, if and when they are needed.

Gradle per-se does not need much stuff, and Gradle itself does not put any license folders anywhere or require to accept a license, except maybe if you try to publish a build --scan where you have to agree the terms of service.

I’m not into Android development, but the concerns you have sound more like being Android specific, with the Android SDK that needs much space and installs quite some things and also afaik is something that requires you to access various licenses.

So I strongly assume your questions are more Android-specific than Gradle-specific and you might get better answers or clarification in some Android-specific community for those questions. :slight_smile:

Thank you. I assumed it was Gradle because the requirements for licenses happened when I typed “gradle build”.

Maybe I’m barking up the wrong tree. Is there a way to make Gradle compile code into executables which can be run on android systems without using android-sdk?

I have no idea, as I said, I’m not an Android developer, but I highly doubt it.

For short: No.

When you build local you need android-sdk to resolved dependencies for basic component of Android (UI component, Activity, Application…).

To packaging app you also need bundle of build tool to compile, processing resource, signing…

But you also have some option with CI/CD like bitrise, github or gitlab to packaging and distribute APK remotely

I’m not sure about the license issue, it may related to: android - Automatically accept all SDK licences - Stack Overflow