Everything you do that builds Android artifacts from Android Studio is based on Android command-line tools, so you can just build them from command-line.
So that you can do it in an automated pipeline, I have a Dockerfile for that.
In my use case, I keep the release signing key from the team for property protection, when a release artifact should be build, it will be built in a pipeline that can retrieve the release signing key.
The official document explains it well.
gradle command which you installed separately to execute Android project’s gradle tasks,
it will fail due to configurations and throws exception like:
> Task :app:kaptDebugKotlin FAILED
Android project needs its own touch.
Just use the
gradlew bash command included in project to execute Android project’s gradle tasks like