Skip to content

Commit 01bbaa5

Browse files
committed
ci: add build android reusable workflow
1 parent 0d4f9f9 commit 01bbaa5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/build-android.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Android CI
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
name: Build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
- name: Configure gradle
14+
uses: ./.github/actions/gradle-setup-action
15+
- name: Setup Android SDK
16+
uses: android-actions/setup-android@v3
17+
- name: Configure sdk.dir
18+
run: echo "sdk.dir=${HOME}/.android/sdk" > local.properties
19+
- name: Enable android build
20+
run: |
21+
if grep -q "enableAndroidBuild" gradle.properties; then
22+
sed -i 's/enableAndroidBuild=.*/enableAndroidBuild=true/' gradle.properties
23+
else
24+
echo "enableAndroidBuild=true" >> gradle.properties
25+
fi
26+
- name: Build
27+
run: ./gradlew --no-daemon build

0 commit comments

Comments
 (0)