Skip to content

Commit 7696da1

Browse files
committed
Clean up Android builds on GitHub Actions.
Use the new setup-gradle action, etc.
1 parent c10b3e8 commit 7696da1

File tree

1 file changed

+16
-33
lines changed

1 file changed

+16
-33
lines changed

.github/workflows/android.yml

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,60 +25,43 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727
- name: Get modern CMake and Ninja
28-
uses: lukka/[email protected]
29-
30-
- name: set up JDK 11
31-
uses: actions/setup-java@v3
32-
with:
33-
java-version: "11"
34-
distribution: "temurin"
35-
cache: gradle
28+
uses: "lukka/[email protected]"
3629

3730
# Do this before building aar since it affects the version
3831
- name: Touch SNAPSHOT marker file
39-
if: ${{ !inputs.release }}
40-
run: touch SNAPSHOT
32+
if: "!inputs.release"
33+
run: "touch SNAPSHOT"
4134

42-
- name: Build AAR
43-
run: ./maintainer-scripts/build-aar.sh
35+
- name: "Build AAR"
36+
run: "./maintainer-scripts/build-aar.sh"
4437

4538
- name: Upload bare AAR
46-
uses: actions/upload-artifact@v3
39+
uses: "actions/upload-artifact@v3"
4740
with:
4841
name: AAR and POM
4942
path: openxr_loader_for_android*
5043

51-
- name: Upload Maven repo
52-
if: inputs.release || inputs.snapshot
53-
uses: actions/upload-artifact@v3
54-
with:
55-
name: repo
56-
path: maintainer-scripts/publish-aar/build/repo/
57-
5844
# Hello XR
5945
build-helloxr:
6046
runs-on: ubuntu-latest
6147
steps:
62-
- uses: actions/checkout@v4
63-
- name: Get modern CMake and Ninja
64-
uses: lukka/[email protected]
65-
- name: set up JDK 11
66-
uses: actions/setup-java@v3
48+
- uses: "actions/checkout@v4"
49+
- name: "Get modern CMake and Ninja"
50+
uses: "lukka/[email protected]"
51+
- name: "set up JDK 11"
52+
uses: "actions/setup-java@v4"
6753
with:
6854
java-version: "11"
6955
distribution: "temurin"
70-
cache: gradle
56+
- uses: "gradle/actions/setup-gradle@v3"
7157

7258
# HelloXR OpenGLES version
7359
- name: Build HelloXR OpenGLES for Android
74-
uses: gradle/gradle-build-action@v2
75-
with:
76-
arguments: assembleOpenGLES${{ inputs.release && 'Release' || 'Debug' }}
77-
build-root-directory: src/tests/hello_xr
60+
run: "cd src/tests/hello_xr && ./gradlew assembleOpenGLES${{ inputs.release && 'Release' || 'Debug' }}"
7861

7962
- name: Upload HelloXR OpenGLES (debug) for Android
80-
if: ${{ !inputs.release }}
81-
uses: actions/upload-artifact@v3
63+
if: "!inputs.release"
64+
uses: "actions/upload-artifact@v3"
8265
with:
8366
name: HelloXR OpenGLES Android
84-
path: src/tests/hello_xr/build/outputs/apk/OpenGLES/debug/*.apk
67+
path: "src/tests/hello_xr/build/outputs/apk/OpenGLES/debug/*.apk"

0 commit comments

Comments
 (0)