Skip to content

Improve Android build prereq checks and add build.sh#6

Open
gvago wants to merge 1 commit intoSagiMedina:mainfrom
gvago:fix/android-build-prereqs
Open

Improve Android build prereq checks and add build.sh#6
gvago wants to merge 1 commit intoSagiMedina:mainfrom
gvago:fix/android-build-prereqs

Conversation

@gvago
Copy link
Copy Markdown

@gvago gvago commented Apr 20, 2026

Summary

  • build-aar.sh now validates Java is installed and version is compatible (auto-selects JDK 17 if default JDK is too new)
  • Auto-installs missing Android SDK platform 26 via sdkmanager
  • Adds GOPATH/bin to PATH so gomobile is found after go install
  • New android/build.sh one-command build: generates local.properties, selects JDK, builds Go bridge if needed, assembles APK, and installs on a connected device

Before this change, building from scratch required manually installing JDK 17, NDK, SDK platform 26, creating local.properties, and running 3 separate commands. Now it's just cd android && ./build.sh.

Test plan

  • cd android/gobridge && ./build-aar.sh on a machine with JDK 26 as default
  • cd android && ./build.sh from a clean state (no local.properties, no cached builds)
  • Build completes and APK installs on a connected device

🤖 Generated with Claude Code

build-aar.sh now checks for Java, validates JDK version (auto-selects
JDK 17 if a too-new JDK is default), auto-installs missing SDK
platform 26, and adds GOPATH/bin to PATH for gomobile.

New android/build.sh wraps the full build: generates local.properties,
selects JDK 17, builds the Go bridge if needed, assembles the APK,
and installs on a connected device. Replaces a multi-step manual
process with a single command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants