Update flutter role

Install system-image
Set android-sdk dir in flutter
This commit is contained in:
Przemek Grondek 2023-08-20 16:19:19 +02:00
parent 06c26a8aaa
commit 10ff873b4a
3 changed files with 14 additions and 8 deletions

View File

@ -59,3 +59,4 @@
sdkmanager --install "platform-tools"
sdkmanager --install "platforms;android-{{ android.sdk.version }}"
sdkmanager --install "sources;android-{{ android.sdk.version }}"
sdkmanager --install "system-images;android-{{ android.sdk.version }};google_apis;x86_64"

View File

@ -37,3 +37,7 @@
src: "{{ flutter.dir }}/bin/dart"
dest: "/usr/local/bin/dart"
state: link
- name: Set flutter android sdk dir
shell:
cmd: flutter config --android-sdk {{ android.dir }}

View File

@ -4,6 +4,15 @@
pkg:
- python3-jmespath
- name: Check if android-sdk has been installed
stat:
path: "{{ android.dir }}"
register: android_sdk_dir_status
- import_tasks: install-android-sdk.yml
when:
- not android_sdk_dir_status.stat.exists
- name: Check if flutter has been installed
stat:
path: "{{ flutter.dir }}"
@ -13,11 +22,3 @@
when:
- not flutter_dir_status.stat.exists
- name: Check if android-sdk has been installed
stat:
path: "{{ android.dir }}"
register: android_sdk_dir_status
- import_tasks: install-android-sdk.yml
when:
- not android_sdk_dir_status.stat.exists