Gradle Android SDK as dependency

Viewed 610

I'm currently searching for a way to have the Android Gradle automatically install the Android SDK as an dependency, so that the build can complete unattended in our GitLab pipeline.
I already come across the gradle plugin "sdk-manager-plugin", but it is marked deprecated with a note to use the automatic download from gradle. But it does not seam to work. If I run "./gradlew" from within a newly spawned docker container with just java and git it does not work. Is there any way to have gradle download the correct SDK Version (specified with compileSdkVersion)?
And also accept the license terms?

I already tried adding "android.builder.sdkDownload=true" to the "gradle.properties" file, but it didn't seam to work (suggested here How to enable automatic download of missing Android SDK packages in Gradle).

0 Answers
Related