Skip to content

Commit a342c55

Browse files
fix(android): add JDK to setup task dependencies
sdkmanager requires JDK 17+. Installs openjdk@24 via brew and sets JAVA_HOME/PATH for the task. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1ae12f7 commit a342c55

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

taskfiles/android.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ tasks:
2424

2525
setup:
2626
desc: "Install Android development dependencies"
27+
env:
28+
JAVA_HOME: /opt/homebrew/opt/openjdk@24
29+
PATH: /opt/homebrew/opt/openjdk@24/bin:{{.PATH}}
2730
cmds:
2831
- |
29-
echo "Installing Android SDK and NDK..."
30-
for pkg in android-commandlinetools; do
32+
echo "Installing JDK and Android SDK..."
33+
for pkg in openjdk@24 android-commandlinetools; do
3134
brew list "$pkg" &>/dev/null || brew install "$pkg"
3235
done
3336
- |
@@ -39,6 +42,8 @@ tasks:
3942
- |
4043
echo "Android setup complete!"
4144
echo "Add these to your shell profile:"
45+
echo ' export JAVA_HOME="/opt/homebrew/opt/openjdk@24"'
46+
echo ' export PATH="$JAVA_HOME/bin:$PATH"'
4247
echo ' export ANDROID_HOME="/opt/homebrew/share/android-commandlinetools"'
4348
echo ' export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/28.2.13676358"'
4449
echo ' export NDK_HOME="$ANDROID_NDK_HOME"'

0 commit comments

Comments
 (0)