diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe7d8873..19ced219 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,13 @@ name: CI on: [pull_request] + env: DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer FLUTTER_VERSION: 3.0.2 JAVA_VERSION: "12.x" JAVA_DISTRIBUTION: 'zulu' + ANDROID_SDK_ROOT: ${{ github.workspace }}/android-sdk jobs: ci: @@ -35,8 +37,17 @@ jobs: - uses: subosito/flutter-action@d8687e6979e8ef66d2b2970e2c92c1d8e801d7bf with: flutter-version: ${{ env.FLUTTER_VERSION }} + - name: Install Android SDK tools + run: | + mkdir -p $ANDROID_SDK_ROOT/cmdline-tools + curl -Lo commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-mac-7583922_latest.zip + unzip -q commandlinetools.zip -d $ANDROID_SDK_ROOT/cmdline-tools + mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest + rm commandlinetools.zip - name: Install Android SDK - run: sdkmanager "platforms;android-34" "build-tools;34.0.0" "ndk;25.1.8937393" + run: | + yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses + $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "platforms;android-34" "build-tools;34.0.0" "ndk;25.1.8937393" - name: Set up local.properties run: | echo "sdk.dir=$ANDROID_SDK_ROOT" > ./android/local.properties