Abort the Android CMake build immediately if any of the command line arguments is not specified, instead of assuming default values.
Add more log messages for different build steps to improve progress reporting and improve the existing log messages.
Improve and fix colors of log messages. Previously, some log message colors were not terminated properly, causing the output color of subsequent commands to change.
Avoid some error messages when the build script is executed for the first time, i.e. when cleanup of the previous build is not necessary because the files do not exist yet.
Make some related variable names more readable by removing the unnecessary underscore and `DEFAULT` prefixes.
Extract `build_gradle` function to reduce duplicate code for running the Gradle build. Remove the initial invocation of Gradle without a build target, which has no effect and was causing an error message during the build.
In ./scripts/android/files/build.sh line 3:
[ x"$1" == x ] && {
^---^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose.
Did you mean:
[ "$1" == "" ] && {