-
Split the download part into a separate script to so docker keeps that step in cache and avoid redownloading it.
-
With API level >= 28 libiconv is not needed anymore because it's part of Android's libc.
-
Generate standalone toolchains to reduce the docker image size. It's also easier because it doesn't need to pass sysroot args.
-
Use clang compiler because gcc is deprecated in this Android NDK and will be removed in the next release.