Now I have to download and install the Android SDK and AVD Manager, and then install the APIs, tools through the UI. Is there a way to automate this process?
I got frustrated with this as well and built a Gradle plugin named com.quittle.setup-android-sdk that will detect and install what you need. It works on Windows, OSX, and Linux and doesn't require any additional dependencies if you build with Gradle.
If you're interested you can checkout my docs on it here: https://github.com/quittle/gradle-setup-android-sdk