Update flutter role
Install system-image Set android-sdk dir in flutter
This commit is contained in:
parent
06c26a8aaa
commit
10ff873b4a
@ -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"
|
||||
|
@ -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 }}
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user