When building an Android application with Gradle we need to point the ANDROID_HOME to our build. Maybe using an environment variable or something in the local.properties file.
I'm trying to find a way to automatically define and use this, if possible.
I've almost achieved the expected result, but because I wasn't able to change the System.env environment variables, this vetoed me.
In this Android class com.android.build.gradle.internal.SdkHandler#findSdkLocation we can see how it is finding and configuring the android sdk location.
Do we have a way to set this environment variable before the project configuration phase starts?
It looks like it needs to be before the include(":android_project") in our settings.gradle.kts.