Rather than overwrite the Android SDKs every run, only do them if they are not listed. update-sdk function can update these manually rather than wasting bandwidth through Ansible.

This commit is contained in:
2026-04-25 08:53:12 -07:00
parent 3629d24b1b
commit b765c5cdae

View File

@@ -243,14 +243,20 @@
# These are safe to run multiple times, and uses the new `latest` version.
- name: Workstation | Linux | Software | Android | Install | Required Modules
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
fi
loop: "{{ android_downloads_required }}"
become_user: "{{ user }}"
when: coding == true
# Add more versions for testing across all the important platforms.
- name: Workstation | Linux | Software | Android | Install | Additional Modules
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
fi
loop: "{{ android_downloads_additional }}"
become_user: "{{ user }}"
when: coding == true and sdks == true