Skip to content

Commit

Permalink
feat: add android
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythologyli committed Nov 2, 2023
1 parent 5628fa6 commit 06187fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ jobs:
- name: Build Android AAR
if: matrix.goos == 'android'
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
export PATH="${HOME}/go/bin:${PATH}"
${HOME}/go/bin/gomobile init
ls -l ${HOME}/go/bin/
gomobile init
mkdir -p build_assets
sudo apt update && sudo apt install openjdk-17-jdk
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Expand All @@ -131,9 +136,6 @@ jobs:
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "platforms;android-${ANDROID_PLATFORM_VERSION}"
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "ndk;${NDK_LTS_VERSION}"
sudo apt install -y --no-install-recommends g++ libc6-dev
go install golang.org/x/mobile/cmd/gomobile@latest
export PATH="${HOME}/go/bin:${PATH}"
gomobile init
gomobile bind -target=android -o build_assets/zju-connect.aar ./mobile
- name: Rename Windows zju-connect
Expand Down

0 comments on commit 06187fe

Please sign in to comment.