Skip to content

Commit 2ae7349

Browse files
committed
GitHub workflow: add Android compile
1 parent 91cd936 commit 2ae7349

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ jobs:
5353
- name: go compile
5454
run: make build
5555

56+
- name: gomobile install
57+
run: go install golang.org/x/mobile/cmd/gomobile@latest
58+
59+
- name: gomobile init
60+
run: gomobile init
61+
62+
- name: android compile
63+
run: make android
64+
5665
- name: wasm compile
5766
run: make wasm
5867

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ macos:
8686
android:
8787
@$(call print, "Building Android library ($(ANDROID_BUILD)).")
8888
mkdir -p $(ANDROID_BUILD_DIR)
89-
GOOS=js $(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) $(RPC_TAGS)" $(LDFLAGS_MOBILE) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
89+
GOOS=js $(GOMOBILE_BIN) bind -target=android -androidapi=21 -tags="mobile $(DEV_TAGS) $(RPC_TAGS)" $(LDFLAGS_MOBILE) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
9090

9191
mobile: ios android
9292

0 commit comments

Comments
 (0)