-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add build android reusable workflow
- Loading branch information
1 parent
6f6fc34
commit 8f6d6c6
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Android CI | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Configure gradle | ||
uses: ./.github/actions/gradle-setup-action | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
- name: Configure sdk.dir | ||
run: echo "sdk.dir=${HOME}/.android/sdk" > local.properties | ||
- name: Enable android build | ||
run: | | ||
if grep -q "enableAndroidBuild" gradle.properties; then | ||
sed -i 's/enableAndroidBuild=.*/enableAndroidBuild=true/' gradle.properties | ||
else | ||
echo "enableAndroidBuild=true" >> gradle.properties | ||
fi | ||
- name: Build | ||
run: ./gradlew --no-daemon build |