tart-macos-image-templates/templates/mojave-flutter.json

84 lines
2.0 KiB
JSON

{
"builders": [
{
"type": "veertu-anka",
"vm_name": "mojave-xcode-{{user `xcode_version`}}-flutter",
"source_vm_name": "mojave-xcode-{{user `xcode_version`}}",
"cpu_count": "2",
"ram_size": "8G",
"disk_size": "100G",
"boot_delay": "30s"
}
],
"variables": {
"xcode_version": "11"
},
"provisioners": [
{
"inline": [
"brew --version",
"brew update"
],
"type": "shell"
},
{
"inline": [
"brew cask install homebrew/cask-versions/java8"
],
"type": "shell"
},
{
"inline": [
"brew cask install android-sdk android-ndk"
],
"type": "shell"
},
{
"inline": [
"echo \"export ANDROID_SDK_ROOT=/usr/local/share/android-sdk\" >> ~/.profile",
"echo \"export ANDROID_NDK_HOME=/usr/local/share/android-ndk\" >> ~/.profile",
"source ~/.profile"
],
"type": "shell"
},
{
"inline": [
"sdkmanager --update"
],
"type": "shell"
},
{
"inline": [
"yes | sdkmanager --licenses"
],
"type": "shell"
},
{
"inline": [
"sdkmanager tools platform-tools emulator",
"yes | sdkmanager \"platforms;android-29\" \"build-tools;29.0.2\"",
"echo 'export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/tools/bin:$ANDROID_SDK_ROOT/platform-tools:$PATH' >> ~/.profile"
],
"type": "shell"
},
{
"inline": [
"echo 'export FLUTTER_HOME=$HOME/flutter' >> ~/.profile",
"echo 'export PATH=$HOME/flutter:$HOME/flutter/bin/:$HOME/flutter/bin/cache/dart-sdk/bin:$PATH' >> ~/.profile",
"source ~/.profile",
"git clone https://github.com/flutter/flutter.git $FLUTTER_HOME",
"cd $FLUTTER_HOME",
"git checkout beta",
"git checkout stable",
"flutter doctor"
],
"type": "shell"
},
{
"inline": [
"brew install libimobiledevice ideviceinstaller ios-deploy"
],
"type": "shell"
}
]
}