Skip to content

Commit c3b0437

Browse files
fix(ci): add JAVA_HOME for Android Gradle build
Gradle requires JDK 11+. The runner defaults to Java 8. Set JAVA_HOME to openjdk@21 and prepend to PATH. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 63957f3 commit c3b0437

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/build-android-app.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
env:
3333
BUNDLE_FROZEN: "true"
3434
RUBYOPT: "-W0"
35+
JAVA_HOME: /opt/homebrew/opt/openjdk@21
3536
ANDROID_HOME: /opt/homebrew/share/android-commandlinetools
3637
ANDROID_NDK_HOME: /opt/homebrew/share/android-commandlinetools/ndk/28.2.13676358
3738
NDK_HOME: /opt/homebrew/share/android-commandlinetools/ndk/28.2.13676358
@@ -98,7 +99,9 @@ jobs:
9899
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties
99100
100101
- name: Build and upload to Google Play
101-
run: task android:testflight
102+
run: |
103+
export PATH="$JAVA_HOME/bin:$PATH"
104+
task android:testflight
102105
env:
103106
FASTLANE_OPT_OUT_USAGE: 1
104107
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_PLAY_JSON_KEY }}

0 commit comments

Comments
 (0)