I wrapped the ${workspaceFolder} and ${HOME} variables in quotes. This helps to avoid issues if there are spaces in the paths (e.g., C:/Users/John Doe/).
The presentation and group settings were duplicated in all tasks. You could refactor this into a reusable block for better maintainability, but in this example, I kept them in each task for clarity.
I changed the rm -rf ~/.gradle/caches and rm -rf ~/.gradle commands to use "${HOME}" instead of ~. Using ${HOME} is safer and more portable in shell scripts, and it ensures that the command will work on all systems (even if ~ is not properly expanded).
I added quotes to paths with potential spaces or special characters (e.g., cd "${workspaceFolder}/android"). This ensures that the shell command works even if the folder path contains spaces or other special characters.
I wrapped the ${workspaceFolder} and ${HOME} variables in quotes. This helps to avoid issues if there are spaces in the paths (e.g., C:/Users/John Doe/). The presentation and group settings were duplicated in all tasks. You could refactor this into a reusable block for better maintainability, but in this example, I kept them in each task for clarity. I changed the rm -rf ~/.gradle/caches and rm -rf ~/.gradle commands to use "${HOME}" instead of ~. Using ${HOME} is safer and more portable in shell scripts, and it ensures that the command will work on all systems (even if ~ is not properly expanded). I added quotes to paths with potential spaces or special characters (e.g., cd "${workspaceFolder}/android"). This ensures that the shell command works even if the folder path contains spaces or other special characters.