From 06187fecbc775a08a6199d93c52f7dfc70340844 Mon Sep 17 00:00:00 2001 From: Myth Date: Fri, 3 Nov 2023 06:44:22 +0800 Subject: [PATCH] feat: add android --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 698c4e8..da33d6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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