File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,17 +15,31 @@ jobs:
1515 - name : Checkout
1616 uses : actions/checkout@v4
1717
18- - name : Set up JDK 11
18+ - name : Set up JDK 17
1919 uses : actions/setup-java@v4
2020 with :
2121 distribution : ' temurin'
22- java-version : ' 11 '
22+ java-version : ' 17 '
2323
24- - name : Set up Android SDK (API 29)
25- uses : r0adkll/setup-android@v2
26- with :
27- api-level : 29
28- build-tools : ' 29.0.3'
24+ - name : Install Android command-line tools and SDK components (API 29)
25+ run : |
26+ sudo apt-get update
27+ sudo apt-get install -y unzip wget
28+ ANDROID_SDK_ROOT=$HOME/Android/Sdk
29+ mkdir -p $ANDROID_SDK_ROOT
30+ # Download command-line tools (Linux)
31+ wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O /tmp/cmdline-tools.zip
32+ unzip -q /tmp/cmdline-tools.zip -d /tmp/cmdline-tools
33+ mkdir -p $ANDROID_SDK_ROOT/cmdline-tools/latest
34+ mv /tmp/cmdline-tools/cmdline-tools/* $ANDROID_SDK_ROOT/cmdline-tools/latest/
35+ # Expose SDK paths for this and subsequent steps
36+ echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" >> $GITHUB_ENV
37+ echo "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" >> $GITHUB_PATH
38+ echo "$ANDROID_SDK_ROOT/platform-tools" >> $GITHUB_PATH
39+ export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$PATH"
40+ # Accept licenses and install required components
41+ yes | sdkmanager --sdk_root=$ANDROID_SDK_ROOT --licenses || true
42+ sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" "platforms;android-29" "build-tools;29.0.3"
2943
3044 - name : Setup Flutter
3145 uses : subosito/flutter-action@v2
You can’t perform that action at this time.
0 commit comments