Skip to content

Commit

Permalink
Update Flutter setup for Windows and Android
Browse files Browse the repository at this point in the history
- Use PowerShell for Windows installation and added `refreshenv`.
- Set JAVA_HOME for Android builds to use Java 17.
  • Loading branch information
svc-design committed Oct 15, 2024
1 parent 7e59e91 commit 5548f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ jobs:
- name: Set up Flutter environment for Windows
if: ${{ matrix.platform == 'windows' }}
shell: powershell
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install flutter -y
echo "C:\\flutter\\bin" >> $GITHUB_ENV
refreshenv
flutter --version
- name: Set up Flutter environment for Android
Expand Down Expand Up @@ -119,6 +121,8 @@ jobs:
flutter build linux --release
;;
"android")
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
flutter build apk --release
;;
"macos")
Expand Down

0 comments on commit 5548f75

Please sign in to comment.