From af13e2c3a48d810d2a7ec6e586b5ea694150182b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 26 Feb 2025 10:10:04 -0700 Subject: [PATCH] Create shortcut for updating SDKs. Remove updating Android SDK from its playbook. --- tasks/general/acct_mgmt/users.yml | 17 +++++++++++++++++ tasks/workstation/linux/software/android.yml | 5 ----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 3a32326..6746e81 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -596,6 +596,22 @@ alias lockup="kill-system" alias freeze="kill-system" alias system-killer="kill-system" + function_update_sdks: | + if [[ "{{ coding }}" == "true" ]]; then + function update-sdks { + echo -e "******* Update SDKs *******\n*** Android ***" + yes | sdkmanager --update + yes | sdkmanager --licenses + + echo "\n*** Flutter ***" + flutter upgrade + yes | flutter doctor --android-licenses + + echo -e "\n******* Done! *******" + } + alias update-sdk="update-sdks" + alias sdk-update="update-sdks" + fi - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -643,6 +659,7 @@ {{ function_clean_code }} {{ alias_kill_battery }} {{ alias_kill_system }} + {{ function_update_sdks }} - name: General | Account Management | Users | Files | .bashrc blockinfile: diff --git a/tasks/workstation/linux/software/android.yml b/tasks/workstation/linux/software/android.yml index b314b4e..6daaf98 100644 --- a/tasks/workstation/linux/software/android.yml +++ b/tasks/workstation/linux/software/android.yml @@ -141,11 +141,6 @@ become_user: "{{ user }}" when: coding == true -- name: Workstation | Linux | Software | Android | Update Modules - shell: "yes | {{ android_sdkmanager_final }} --update --sdk_root={{ android_sdk_location }}" - become_user: "{{ user }}" - when: coding == true - - name: Workstation | Linux | Software | Android | Inform Flutter shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}" become_user: "{{ user }}"