Skip to content

Commit 263d1f1

Browse files
mapleafgoclaude
andcommitted
fix(task): mobile 任务添加 mkdir -p 确保输出目录存在
gomobile bind 不会自动创建输出目录,导致 Android AAR 构建失败。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 227eb79 commit 263d1f1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Taskfile.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,19 @@ tasks:
108108
mobile-android-arm64:
109109
desc: Build Android AAR for arm64 (gomobile)
110110
cmds:
111+
- mkdir -p {{.BINDIR}}
111112
- gomobile bind -trimpath -tags '{{.BUILDTAGS}}' -ldflags '{{.LDFLAGS}} -checklinkname=0' -target=android/arm64 -androidapi 29 -javapkg cn.mapleafgo -o {{.BINDIR}}/lib{{.NAME}}-android-arm64.aar ./ffi
112113

113114
mobile-android-amd64:
114115
desc: Build Android AAR for amd64 (gomobile)
115116
cmds:
117+
- mkdir -p {{.BINDIR}}
116118
- gomobile bind -trimpath -tags '{{.BUILDTAGS}}' -ldflags '{{.LDFLAGS}} -checklinkname=0' -target=android/amd64 -androidapi 29 -javapkg cn.mapleafgo -o {{.BINDIR}}/lib{{.NAME}}-android-amd64.aar ./ffi
117119

118120
mobile-ios-arm64:
119121
desc: Build iOS xcframework (gomobile)
120122
cmds:
123+
- mkdir -p {{.BINDIR}}
121124
- gomobile bind -trimpath -tags '{{.BUILDTAGS}}' -ldflags '{{.LDFLAGS}}' -target=ios -o {{.BINDIR}}/{{.NAME}}.xcframework ./ffi
122125

123126
mobile-all:

0 commit comments

Comments
 (0)